diff options
Diffstat (limited to 'tests/Components/ArrayObjTest.php')
-rw-r--r-- | tests/Components/ArrayObjTest.php | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/tests/Components/ArrayObjTest.php b/tests/Components/ArrayObjTest.php new file mode 100644 index 0000000..7694dfb --- /dev/null +++ b/tests/Components/ArrayObjTest.php @@ -0,0 +1,40 @@ +<?php + +namespace SqlParser\Tests\Components; + +use SqlParser\Components\ArrayObj; + +use SqlParser\Tests\TestCase; + +class ArrayObjTest extends TestCase +{ + + public function testBuildRaw() + { + $component = new ArrayObj(array('a', 'b'), array()); + $this->assertEquals('(a, b)', ArrayObj::build($component)); + } + + public function testBuildValues() + { + $component = new ArrayObj(array(), array('a', 'b')); + $this->assertEquals('(a, b)', ArrayObj::build($component)); + } + + /** + * @dataProvider testParseProvider + */ + public function testParse($test) + { + $this->runParserTest($test); + } + + public function testParseProvider() + { + return array( + array('parseArrayErr1'), + array('parseArrayErr2'), + array('parseArrayErr3'), + ); + } +} |