diff options
author | Dan Ungureanu <udan1107@gmail.com> | 2016-02-21 22:53:00 +0200 |
---|---|---|
committer | Dan Ungureanu <udan1107@gmail.com> | 2016-02-21 22:53:00 +0200 |
commit | b4d9dab06c277b5dedaa9cf41eaac8e274098563 (patch) | |
tree | b5a42381c908ad963edc63154435caf205130674 /tests/Components/LimitTest.php | |
parent | ad8407a13a8af04e9553b6c4e4068a4d5638bf72 (diff) | |
download | sql-parser-b4d9dab06c277b5dedaa9cf41eaac8e274098563.zip sql-parser-b4d9dab06c277b5dedaa9cf41eaac8e274098563.tar.gz sql-parser-b4d9dab06c277b5dedaa9cf41eaac8e274098563.tar.bz2 |
Misc: Fixed coding style issues.
Signed-off-by: Dan Ungureanu <udan1107@gmail.com>
Diffstat (limited to 'tests/Components/LimitTest.php')
-rw-r--r-- | tests/Components/LimitTest.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/Components/LimitTest.php b/tests/Components/LimitTest.php new file mode 100644 index 0000000..bc5a462 --- /dev/null +++ b/tests/Components/LimitTest.php @@ -0,0 +1,40 @@ +<?php + +namespace SqlParser\Tests\Components; + +use SqlParser\Parser; +use SqlParser\Components\Limit; + +use SqlParser\Tests\TestCase; + +class LimitTest extends TestCase +{ + + public function testBuild() + { + $component = new Limit(1); + $this->assertEquals(Limit::build($component), '1'); + } + + public function testBuildWithOffset() + { + $component = new Limit(1, 2); + $this->assertEquals(Limit::build($component), '2, 1'); + } + + /** + * @dataProvider testParseProvider + */ + public function testParse($test) + { + $this->runParserTest($test); + } + + public function testParseProvider() + { + return array( + array('parser/parseLimitErr1'), + array('parser/parseLimitErr2'), + ); + } +} |