diff options
-rw-r--r-- | tests/Utils/QueryTest.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/Utils/QueryTest.php b/tests/Utils/QueryTest.php index 3bc1783..f4676ec 100644 --- a/tests/Utils/QueryTest.php +++ b/tests/Utils/QueryTest.php @@ -598,6 +598,20 @@ class QueryTest extends TestCase ); } + public function testReplaceNonExistingPart() + { + $parser = new Parser('ALTER TABLE `sale_mast` OPTIMIZE PARTITION p3'); + $this->assertEquals( + ' ALTER TABLE `sale_mast` OPTIMIZE PARTITION p3', + Query::replaceClause( + $parser->statements[0], + $parser->list, + 'ORDER BY', + '' + ) + ); + } + public function testReplaceClauses() { $this->assertEquals('', Query::replaceClauses(null, null, array())); |