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.php25
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/Components/ArrayObjTest.php b/tests/Components/ArrayObjTest.php
index 4c782d2..2df1276 100644
--- a/tests/Components/ArrayObjTest.php
+++ b/tests/Components/ArrayObjTest.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
namespace PhpMyAdmin\SqlParser\Tests\Components;
@@ -10,13 +11,13 @@ class ArrayObjTest extends TestCase
{
public function testBuildRaw()
{
- $component = new ArrayObj(array('a', 'b'), array());
+ $component = new ArrayObj(['a', 'b'], []);
$this->assertEquals('(a, b)', ArrayObj::build($component));
}
public function testBuildValues()
{
- $component = new ArrayObj(array(), array('a', 'b'));
+ $component = new ArrayObj([], ['a', 'b']);
$this->assertEquals('(a, b)', ArrayObj::build($component));
}
@@ -25,19 +26,19 @@ class ArrayObjTest extends TestCase
$components = ArrayObj::parse(
new Parser(),
$this->getTokensList('(1 + 2, 3 + 4)'),
- array(
+ [
'type' => 'PhpMyAdmin\\SqlParser\\Components\\Expression',
- 'typeOptions' => array(
+ 'typeOptions' => [
'breakOnParentheses' => true,
- ),
- )
+ ],
+ ]
);
$this->assertEquals($components[0]->expr, '1 + 2');
$this->assertEquals($components[1]->expr, '3 + 4');
}
/**
- * @dataProvider testParseProvider
+ * @dataProvider parseProvider
*
* @param mixed $test
*/
@@ -46,11 +47,11 @@ class ArrayObjTest extends TestCase
$this->runParserTest($test);
}
- public function testParseProvider()
+ public function parseProvider()
{
- return array(
- array('parser/parseArrayErr1'),
- array('parser/parseArrayErr3'),
- );
+ return [
+ ['parser/parseArrayErr1'],
+ ['parser/parseArrayErr3'],
+ ];
}
}