summaryrefslogtreecommitdiffstats
path: root/tests/Components/ArrayObjTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Components/ArrayObjTest.php')
-rw-r--r--tests/Components/ArrayObjTest.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/Components/ArrayObjTest.php b/tests/Components/ArrayObjTest.php
index 13be866..00321ed 100644
--- a/tests/Components/ArrayObjTest.php
+++ b/tests/Components/ArrayObjTest.php
@@ -2,6 +2,7 @@
namespace SqlParser\Tests\Components;
+use SqlParser\Parser;
use SqlParser\Components\ArrayObj;
use SqlParser\Tests\TestCase;
@@ -21,6 +22,22 @@ class ArrayObjTest extends TestCase
$this->assertEquals('(a, b)', ArrayObj::build($component));
}
+ public function testParseType()
+ {
+ $components = ArrayObj::parse(
+ new Parser(),
+ $this->getTokensList('(1 + 2, 3 + 4)'),
+ array(
+ 'type' => 'SqlParser\\Components\\Expression',
+ 'typeOptions' => array(
+ 'noBrackets' => true,
+ ),
+ )
+ );
+ $this->assertEquals($components[0]->expr, '1 + 2');
+ $this->assertEquals($components[1]->expr, '3 + 4');
+ }
+
/**
* @dataProvider testParseProvider
*/