summaryrefslogtreecommitdiffstats
path: root/tests/Components/LockExpressionTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Components/LockExpressionTest.php')
-rw-r--r--tests/Components/LockExpressionTest.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/tests/Components/LockExpressionTest.php b/tests/Components/LockExpressionTest.php
index 00d5ffb..2fc86bd 100644
--- a/tests/Components/LockExpressionTest.php
+++ b/tests/Components/LockExpressionTest.php
@@ -1,4 +1,5 @@
<?php
+declare(strict_types=1);
namespace PhpMyAdmin\SqlParser\Tests\Components;
@@ -26,10 +27,10 @@ class LockExpressionTest extends TestCase
}
/**
- * @dataProvider parseErrProvider
- *
* @param mixed $expr
* @param mixed $error
+ *
+ * @dataProvider parseErrProvider
*/
public function testParseErr($expr, $error)
{
@@ -41,28 +42,28 @@ class LockExpressionTest extends TestCase
public function parseErrProvider()
{
- return array(
- array(
+ return [
+ [
'table1 AS t1',
'Unexpected end of LOCK expression.',
- ),
- array(
+ ],
+ [
'table1 AS t1 READ WRITE',
'Unexpected keyword.',
- ),
- array(
+ ],
+ [
'table1 AS t1 READ 2',
'Unexpected token.',
- )
- );
+ ],
+ ];
}
public function testBuild()
{
- $component = array(
+ $component = [
LockExpression::parse(new Parser(), $this->getTokensList('table1 AS t1 READ LOCAL')),
- LockExpression::parse(new Parser(), $this->getTokensList('table2 LOW_PRIORITY WRITE'))
- );
+ LockExpression::parse(new Parser(), $this->getTokensList('table2 LOW_PRIORITY WRITE')),
+ ];
$this->assertEquals(
LockExpression::build($component),
'table1 AS `t1` READ LOCAL, table2 LOW_PRIORITY WRITE'