diff options
author | William Desportes <williamdes@wdes.fr> | 2019-12-31 20:25:11 +0100 |
---|---|---|
committer | William Desportes <williamdes@wdes.fr> | 2019-12-31 20:26:06 +0100 |
commit | e61b53701a72d4454e5ffa644d7ac86f976ee65b (patch) | |
tree | 38d98b9c0c3be8c066a737078065ca95c7a17395 /tests | |
parent | 8a9b8fcd3357fbf42756519bcea7ef3ca668aaf5 (diff) | |
parent | f14d9a8d6bd75ab89c4ac19d4b7fef0a218951ec (diff) | |
download | sql-parser-e61b53701a72d4454e5ffa644d7ac86f976ee65b.zip sql-parser-e61b53701a72d4454e5ffa644d7ac86f976ee65b.tar.gz sql-parser-e61b53701a72d4454e5ffa644d7ac86f976ee65b.tar.bz2 |
Merge #279 - fix php error undefined index
Pull-request: #279
Fixes: #249
Signed-off-by: William Desportes <williamdes@wdes.fr>
Diffstat (limited to 'tests')
-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())); |