* Update sqlparser to fit php8.
This commit is contained in:
+10
-16
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace PhpMyAdmin\SqlParser\Tests\Builder;
|
||||
|
||||
use PhpMyAdmin\SqlParser\Parser;
|
||||
@@ -7,11 +9,9 @@ use PhpMyAdmin\SqlParser\Tests\TestCase;
|
||||
|
||||
class ReplaceStatementTest extends TestCase
|
||||
{
|
||||
public function testBuilder()
|
||||
public function testBuilder(): void
|
||||
{
|
||||
$parser = new Parser(
|
||||
'REPLACE INTO tbl(col1, col2, col3) VALUES (1, "str", 3.14)'
|
||||
);
|
||||
$parser = new Parser('REPLACE INTO tbl(col1, col2, col3) VALUES (1, "str", 3.14)');
|
||||
$stmt = $parser->statements[0];
|
||||
$this->assertEquals(
|
||||
'REPLACE INTO tbl(`col1`, `col2`, `col3`) VALUES (1, "str", 3.14)',
|
||||
@@ -19,11 +19,9 @@ class ReplaceStatementTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testBuilderSet()
|
||||
public function testBuilderSet(): void
|
||||
{
|
||||
$parser = new Parser(
|
||||
'REPLACE INTO tbl(col1, col2, col3) SET col1=1, col2="str", col3=3.14'
|
||||
);
|
||||
$parser = new Parser('REPLACE INTO tbl(col1, col2, col3) SET col1=1, col2="str", col3=3.14');
|
||||
$stmt = $parser->statements[0];
|
||||
$this->assertEquals(
|
||||
'REPLACE INTO tbl(`col1`, `col2`, `col3`) SET col1 = 1, col2 = "str", col3 = 3.14',
|
||||
@@ -31,11 +29,9 @@ class ReplaceStatementTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testBuilderSelect()
|
||||
public function testBuilderSelect(): void
|
||||
{
|
||||
$parser = new Parser(
|
||||
'REPLACE INTO tbl(col1, col2, col3) SELECT col1, col2, col3 FROM tbl2'
|
||||
);
|
||||
$parser = new Parser('REPLACE INTO tbl(col1, col2, col3) SELECT col1, col2, col3 FROM tbl2');
|
||||
$stmt = $parser->statements[0];
|
||||
$this->assertEquals(
|
||||
'REPLACE INTO tbl(`col1`, `col2`, `col3`) SELECT col1, col2, col3 FROM tbl2',
|
||||
@@ -43,11 +39,9 @@ class ReplaceStatementTest extends TestCase
|
||||
);
|
||||
}
|
||||
|
||||
public function testBuilderSelectDelayed()
|
||||
public function testBuilderSelectDelayed(): void
|
||||
{
|
||||
$parser = new Parser(
|
||||
'REPLACE DELAYED INTO tbl(col1, col2, col3) SELECT col1, col2, col3 FROM tbl2'
|
||||
);
|
||||
$parser = new Parser('REPLACE DELAYED INTO tbl(col1, col2, col3) SELECT col1, col2, col3 FROM tbl2');
|
||||
$stmt = $parser->statements[0];
|
||||
$this->assertEquals(
|
||||
'REPLACE DELAYED INTO tbl(`col1`, `col2`, `col3`) SELECT col1, col2, col3 FROM tbl2',
|
||||
|
||||
Reference in New Issue
Block a user