summaryrefslogtreecommitdiffstats
path: root/tests/Components/ArrayObjTest.php
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2019-05-28 13:00:00 +0200
committerWilliam Desportes <williamdes@wdes.fr>2019-05-28 15:08:34 +0200
commit930a860bc7f0684c45babd012070f88a9505d427 (patch)
tree40269b2466aa6585c8c65f42d02a00a496c2fa46 /tests/Components/ArrayObjTest.php
parent5d5089a259d0195c4a1e4aa3588c31c839954067 (diff)
downloadsql-parser-930a860bc7f0684c45babd012070f88a9505d427.zip
sql-parser-930a860bc7f0684c45babd012070f88a9505d427.tar.gz
sql-parser-930a860bc7f0684c45babd012070f88a9505d427.tar.bz2
revert of new array syntax
See: 86c5baebda24c1721fb6881df8671a3c7df60e8b Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'tests/Components/ArrayObjTest.php')
-rw-r--r--tests/Components/ArrayObjTest.php20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/Components/ArrayObjTest.php b/tests/Components/ArrayObjTest.php
index 2df1276..dac9947 100644
--- a/tests/Components/ArrayObjTest.php
+++ b/tests/Components/ArrayObjTest.php
@@ -11,13 +11,13 @@ class ArrayObjTest extends TestCase
{
public function testBuildRaw()
{
- $component = new ArrayObj(['a', 'b'], []);
+ $component = new ArrayObj(array('a', 'b'), array());
$this->assertEquals('(a, b)', ArrayObj::build($component));
}
public function testBuildValues()
{
- $component = new ArrayObj([], ['a', 'b']);
+ $component = new ArrayObj(array(), array('a', 'b'));
$this->assertEquals('(a, b)', ArrayObj::build($component));
}
@@ -26,12 +26,12 @@ class ArrayObjTest extends TestCase
$components = ArrayObj::parse(
new Parser(),
$this->getTokensList('(1 + 2, 3 + 4)'),
- [
+ array(
'type' => 'PhpMyAdmin\\SqlParser\\Components\\Expression',
- 'typeOptions' => [
+ 'typeOptions' => array(
'breakOnParentheses' => true,
- ],
- ]
+ )
+ )
);
$this->assertEquals($components[0]->expr, '1 + 2');
$this->assertEquals($components[1]->expr, '3 + 4');
@@ -49,9 +49,9 @@ class ArrayObjTest extends TestCase
public function parseProvider()
{
- return [
- ['parser/parseArrayErr1'],
- ['parser/parseArrayErr3'],
- ];
+ return array(
+ array('parser/parseArrayErr1'),
+ array('parser/parseArrayErr3')
+ );
}
}