diff options
author | Michal Čihař <michal@cihar.com> | 2017-07-12 11:05:50 +0200 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2017-07-12 11:08:18 +0200 |
commit | 0a699b1b45c226779eddc7b2760cac4c897553b5 (patch) | |
tree | 5628c0ebfe3112a3b1c1bc1bf7d20e8c410c9ea7 /tests | |
parent | 498f1b161471c6feb51a738526742c81bc2c5159 (diff) | |
download | sql-parser-0a699b1b45c226779eddc7b2760cac4c897553b5.zip sql-parser-0a699b1b45c226779eddc7b2760cac4c897553b5.tar.gz sql-parser-0a699b1b45c226779eddc7b2760cac4c897553b5.tar.bz2 |
Add tests for (partially) parsed queries
Signed-off-by: Michal Čihař <michal@cihar.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Components/CreateDefinitionTest.php | 1 | ||||
-rw-r--r-- | tests/Components/ExpressionTest.php | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/tests/Components/CreateDefinitionTest.php b/tests/Components/CreateDefinitionTest.php index eca7362..57d5add 100644 --- a/tests/Components/CreateDefinitionTest.php +++ b/tests/Components/CreateDefinitionTest.php @@ -27,6 +27,7 @@ class CreateDefinitionTest extends TestCase $parser, $this->getTokensList('(str TEXT, FULLTEXT INDEX indx (str)') ); + $this->assertEquals(2, count($component)); $this->assertEquals( 'A closing bracket was expected.', diff --git a/tests/Components/ExpressionTest.php b/tests/Components/ExpressionTest.php index 09a50b0..bb4b8fc 100644 --- a/tests/Components/ExpressionTest.php +++ b/tests/Components/ExpressionTest.php @@ -17,6 +17,7 @@ class ExpressionTest extends TestCase public function testParse2() { $component = Expression::parse(new Parser(), $this->getTokensList('col`test`')); + $this->assertEquals($component->expr, 'col'); } /** |