Skip to content

Commit 482601c

Browse files
committed
added a test for find_single_table mode
1 parent adf8728 commit 482601c

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

tests/OddsTest.php

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?php
2+
use PHPUnit\Framework\TestCase;
3+
4+
final class OddsTest extends TestCase{
5+
6+
# tests for odds and ends
7+
8+
function testSingleTable(){
9+
10+
$obj = new iamcal\SQLParser();
11+
12+
$obj->parse("CREATE TABLE foo; CREATE TABLE bar");
13+
$this->assertEquals(count($obj->tables), 2);
14+
15+
$obj->find_single_table = true;
16+
$obj->parse("CREATE TABLE foo; CREATE TABLE bar");
17+
$this->assertEquals(count($obj->tables), 1);
18+
}
19+
}

0 commit comments

Comments
 (0)