diff options
Diffstat (limited to 'tests/Components/LockExpressionTest.php')
-rw-r--r-- | tests/Components/LockExpressionTest.php | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/tests/Components/LockExpressionTest.php b/tests/Components/LockExpressionTest.php index 56654a6..003c887 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,7 +27,7 @@ class LockExpressionTest extends TestCase } /** - * @dataProvider testParseErrProvider + * @dataProvider parseErrProvider * * @param mixed $expr * @param mixed $error @@ -39,30 +40,30 @@ class LockExpressionTest extends TestCase $this->assertEquals($errors[0][0], $error); } - public function testParseErrProvider() + 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')), - ); + ]; $this->assertEquals( LockExpression::build($component), 'table1 AS `t1` READ LOCAL, table2 LOW_PRIORITY WRITE' |