summaryrefslogtreecommitdiffstats
path: root/tests/Builder/ReplaceStatementTest.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/Builder/ReplaceStatementTest.php')
-rw-r--r--tests/Builder/ReplaceStatementTest.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/tests/Builder/ReplaceStatementTest.php b/tests/Builder/ReplaceStatementTest.php
index 2610ac0..ee5b95a 100644
--- a/tests/Builder/ReplaceStatementTest.php
+++ b/tests/Builder/ReplaceStatementTest.php
@@ -15,7 +15,7 @@ class ReplaceStatementTest extends TestCase
);
$stmt = $parser->statements[0];
$this->assertEquals(
- 'REPLACE INTO tbl(`col1`, `col2`, `col3`) VALUES (1, "str", 3.14)',
+ 'REPLACE INTO tbl(`col1`, `col2`, `col3`) VALUES (1, "str", 3.14)',
$stmt->build()
);
}
@@ -27,7 +27,7 @@ class ReplaceStatementTest extends TestCase
);
$stmt = $parser->statements[0];
$this->assertEquals(
- 'REPLACE INTO tbl(`col1`, `col2`, `col3`) SET col1 = 1, col2 = "str", col3 = 3.14',
+ 'REPLACE INTO tbl(`col1`, `col2`, `col3`) SET col1 = 1, col2 = "str", col3 = 3.14',
$stmt->build()
);
}
@@ -39,7 +39,19 @@ class ReplaceStatementTest extends TestCase
);
$stmt = $parser->statements[0];
$this->assertEquals(
- 'REPLACE INTO tbl(`col1`, `col2`, `col3`) SELECT col1, col2, col3 FROM tbl2 ',
+ 'REPLACE INTO tbl(`col1`, `col2`, `col3`) SELECT col1, col2, col3 FROM tbl2',
+ $stmt->build()
+ );
+ }
+
+ public function testBuilderSelectDelayed()
+ {
+ $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',
$stmt->build()
);
}