summaryrefslogtreecommitdiffstats
path: root/tests/Components/ArrayObjTest.php
diff options
context:
space:
mode:
authorDan Ungureanu <udan1107@gmail.com>2015-07-10 01:45:45 +0300
committerDan Ungureanu <udan1107@gmail.com>2015-07-10 03:47:19 +0300
commit527842708bf44fe2bb4d17a97203cec01b860960 (patch)
tree9eb52c23199199b721b5412e1c16d9129d624e52 /tests/Components/ArrayObjTest.php
parent7c925b68763e86be121664575632c9261d380821 (diff)
downloadsql-parser-527842708bf44fe2bb4d17a97203cec01b860960.zip
sql-parser-527842708bf44fe2bb4d17a97203cec01b860960.tar.gz
sql-parser-527842708bf44fe2bb4d17a97203cec01b860960.tar.bz2
Mass renaming. Using 'component' instead of 'fragment'.
Diffstat (limited to 'tests/Components/ArrayObjTest.php')
-rw-r--r--tests/Components/ArrayObjTest.php40
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'),
+ );
+ }
+}