Skip to content

Commit 38afaea

Browse files
committed
Add test case for #249
Signed-off-by: William Desportes <williamdes@wdes.fr>
1 parent 8a9b8fc commit 38afaea

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

tests/Utils/QueryTest.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,20 @@ public function testReplaceClauseOnlyKeyword()
598598
);
599599
}
600600

601+
public function testReplaceNonExistingPart()
602+
{
603+
$parser = new Parser('ALTER TABLE `sale_mast` OPTIMIZE PARTITION p3');
604+
$this->assertEquals(
605+
' ALTER TABLE `sale_mast` OPTIMIZE PARTITION p3',
606+
Query::replaceClause(
607+
$parser->statements[0],
608+
$parser->list,
609+
'ORDER BY',
610+
''
611+
)
612+
);
613+
}
614+
601615
public function testReplaceClauses()
602616
{
603617
$this->assertEquals('', Query::replaceClauses(null, null, array()));

0 commit comments

Comments
 (0)