diff options
author | Dan Ungureanu <udan1107@gmail.com> | 2015-07-03 21:18:10 +0300 |
---|---|---|
committer | Dan Ungureanu <udan1107@gmail.com> | 2015-07-04 23:41:52 +0300 |
commit | b3eff80030f9bd6d90e65360eb89e18a1be298b2 (patch) | |
tree | db420fef27f24856f4cfaeee008104fdfcb77942 /tests/Lexer/IsMethodsTest.php | |
parent | 4dabcc2ae266c022e44294bfbe3344b05e66e266 (diff) | |
download | sql-parser-b3eff80030f9bd6d90e65360eb89e18a1be298b2.zip sql-parser-b3eff80030f9bd6d90e65360eb89e18a1be298b2.tar.gz sql-parser-b3eff80030f9bd6d90e65360eb89e18a1be298b2.tar.bz2 |
The context depends on the SQL mode.
Implemented a few more builders.
Improved some fragments and statement types.
Fixed the noAlias option in FieldFragment.
Reordered CREATE statements's options.
Updated contexts definitions.
Fixed typos. Improved tests.
Diffstat (limited to 'tests/Lexer/IsMethodsTest.php')
-rw-r--r-- | tests/Lexer/IsMethodsTest.php | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/Lexer/IsMethodsTest.php b/tests/Lexer/IsMethodsTest.php index dfd065d..a817e65 100644 --- a/tests/Lexer/IsMethodsTest.php +++ b/tests/Lexer/IsMethodsTest.php @@ -17,13 +17,16 @@ class IsMethodsTest extends TestCase $this->assertEquals(1 | Token::FLAG_KEYWORD_RESERVED, Context::isKeyword('DISTINCT')); $this->assertEquals( - 1 | Token::FLAG_KEYWORD_COMPOSED | Token::FLAG_KEYWORD_KEY, + 1 | Token::FLAG_KEYWORD_RESERVED | Token::FLAG_KEYWORD_COMPOSED | Token::FLAG_KEYWORD_KEY, Context::isKeyword('PRIMARY KEY') ); - $this->assertEquals(1 | Token::FLAG_KEYWORD_COMPOSED, Context::isKeyword('CHARACTER SET')); + $this->assertEquals( + 1 | Token::FLAG_KEYWORD_RESERVED | Token::FLAG_KEYWORD_COMPOSED, + Context::isKeyword('CHARACTER SET') + ); $this->assertEquals(1 | Token::FLAG_KEYWORD_RESERVED, Context::isKeyword('FROM', true)); - $this->assertEquals(null, Context::isKeyword('PRIMARY KEY', true)); + $this->assertEquals(null, Context::isKeyword('MODIFY', true)); $this->assertEquals(null, Context::isKeyword('foo')); $this->assertEquals(null, Context::isKeyword('bar baz')); |