diff options
author | Michal Čihař <michal@cihar.com> | 2017-06-01 14:57:13 +0200 |
---|---|---|
committer | Michal Čihař <michal@cihar.com> | 2017-06-01 14:57:13 +0200 |
commit | f18666a810fd84bf5a00145e6b39453a1987e835 (patch) | |
tree | f3c09cabc6fbd074096096904a236d0ed725d648 /tests | |
parent | 9837c187eab38a530a58615836165a5a0272cdb3 (diff) | |
parent | 48d61a0c05316a25d9462379e79ff56d5e22a29c (diff) | |
download | sql-parser-f18666a810fd84bf5a00145e6b39453a1987e835.zip sql-parser-f18666a810fd84bf5a00145e6b39453a1987e835.tar.gz sql-parser-f18666a810fd84bf5a00145e6b39453a1987e835.tar.bz2 |
Merge commit '48d61a0c05316a25d9462379e79ff56d5e22a29c'
Diffstat (limited to 'tests')
-rw-r--r-- | tests/Components/GroupKeywordTest.php | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/Components/GroupKeywordTest.php b/tests/Components/GroupKeywordTest.php new file mode 100644 index 0000000..515de6b --- /dev/null +++ b/tests/Components/GroupKeywordTest.php @@ -0,0 +1,24 @@ +<?php + +namespace PhpMyAdmin\SqlParser\Tests\Components; + +use PhpMyAdmin\SqlParser\Components\Expression; +use PhpMyAdmin\SqlParser\Components\GroupKeyword; +use PhpMyAdmin\SqlParser\Tests\TestCase; + +class GroupKeywordTest extends TestCase +{ + public function testBuild() + { + $this->assertEquals( + GroupKeyword::build( + array( + new GroupKeyword(new Expression('a'), 'ASC'), + new GroupKeyword(new Expression('b'), 'DESC'), + new GroupKeyword(new Expression('c')), + ) + ), + 'a ASC, b DESC, c' + ); + } +} |