summaryrefslogtreecommitdiffstats
path: root/tests/Utils/QueryTest.php
diff options
context:
space:
mode:
authorWilliam Desportes <williamdes@wdes.fr>2019-12-31 20:31:48 +0100
committerWilliam Desportes <williamdes@wdes.fr>2019-12-31 20:32:35 +0100
commit9ed9cc371543b0ebbca206b484ce8717f7b19d2f (patch)
treed50a482f8bbfc602ecce301371343ddeedd58a5a /tests/Utils/QueryTest.php
parentde9009d256336851fa7ef8c7166aeedf26be988b (diff)
parent365f75845cc0ea38e03dc7ebfe54cf1405242299 (diff)
downloadsql-parser-9ed9cc371543b0ebbca206b484ce8717f7b19d2f.zip
sql-parser-9ed9cc371543b0ebbca206b484ce8717f7b19d2f.tar.gz
sql-parser-9ed9cc371543b0ebbca206b484ce8717f7b19d2f.tar.bz2
Merge branch 'QA'
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'tests/Utils/QueryTest.php')
-rw-r--r--tests/Utils/QueryTest.php14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/Utils/QueryTest.php b/tests/Utils/QueryTest.php
index 340f70f..5639610 100644
--- a/tests/Utils/QueryTest.php
+++ b/tests/Utils/QueryTest.php
@@ -599,6 +599,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, []));