diff options
Diffstat (limited to 'tests/Components/OrderKeywordTest.php')
-rw-r--r-- | tests/Components/OrderKeywordTest.php | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/tests/Components/OrderKeywordTest.php b/tests/Components/OrderKeywordTest.php new file mode 100644 index 0000000..df8c95c --- /dev/null +++ b/tests/Components/OrderKeywordTest.php @@ -0,0 +1,26 @@ +<?php + +namespace SqlParser\Tests\Components; + +use SqlParser\Parser; +use SqlParser\Components\Expression; +use SqlParser\Components\OrderKeyword; + +use SqlParser\Tests\TestCase; + +class OrderKeywordTest extends TestCase +{ + + public function testBuild() + { + $this->assertEquals( + OrderKeyword::build( + array( + new OrderKeyword(new Expression('a'), 'ASC'), + new OrderKeyword(new Expression('b'), 'DESC') + ) + ), + 'a ASC, b DESC' + ); + } +} |