summaryrefslogtreecommitdiffstats
path: root/tests
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:32 +0200
commit5d5089a259d0195c4a1e4aa3588c31c839954067 (patch)
tree645dab617127089baadcf5e3eed95e0f21a5b46c /tests
parent724b2330dc4cb6247aa1649cc1f49fce496f2e3c (diff)
downloadsql-parser-5d5089a259d0195c4a1e4aa3588c31c839954067.zip
sql-parser-5d5089a259d0195c4a1e4aa3588c31c839954067.tar.gz
sql-parser-5d5089a259d0195c4a1e4aa3588c31c839954067.tar.bz2
Revert array syntax
See: 86c5baebda24c1721fb6881df8671a3c7df60e8b Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'tests')
-rw-r--r--tests/TestCase.php8
-rw-r--r--tests/Utils/BufferedQueryTest.php2
-rw-r--r--tests/Utils/FormatterTest.php2
3 files changed, 6 insertions, 6 deletions
diff --git a/tests/TestCase.php b/tests/TestCase.php
index 71febab..f819118 100644
--- a/tests/TestCase.php
+++ b/tests/TestCase.php
@@ -45,7 +45,7 @@ abstract class TestCase extends BaseTestCase
*/
public function getErrorsAsArray($obj)
{
- $ret = [];
+ $ret = array();
foreach ($obj->errors as $err) {
$ret[] = $obj instanceof Lexer
? [
@@ -101,14 +101,14 @@ abstract class TestCase extends BaseTestCase
// Lexer.
$lexer = new Lexer($data['query']);
$lexerErrors = $this->getErrorsAsArray($lexer);
- $lexer->errors = [];
+ $lexer->errors = array();
// Parser.
$parser = empty($data['parser']) ? null : new Parser($lexer->list);
- $parserErrors = [];
+ $parserErrors = array();
if ($parser !== null) {
$parserErrors = $this->getErrorsAsArray($parser);
- $parser->errors = [];
+ $parser->errors = array();
}
// Testing objects.
diff --git a/tests/Utils/BufferedQueryTest.php b/tests/Utils/BufferedQueryTest.php
index f7d5705..ce22d4a 100644
--- a/tests/Utils/BufferedQueryTest.php
+++ b/tests/Utils/BufferedQueryTest.php
@@ -28,7 +28,7 @@ class BufferedQueryTest extends TestCase
*
* @var array
*/
- $statements = [];
+ $statements = array();
/**
* The `BufferedQuery` instance used for extraction.
diff --git a/tests/Utils/FormatterTest.php b/tests/Utils/FormatterTest.php
index 08b7377..e758d9d 100644
--- a/tests/Utils/FormatterTest.php
+++ b/tests/Utils/FormatterTest.php
@@ -241,7 +241,7 @@ class FormatterTest extends TestCase
* @param mixed $cli
* @param mixed $html
*/
- public function testFormat($query, $text, $cli, $html, array $options = [])
+ public function testFormat($query, $text, $cli, $html, array $options = array())
{
// Test TEXT format
$this->assertEquals($text, Formatter::format($query, ['type' => 'text'] + $options), 'Text formatting failed.');