Skip to content

Commit

Permalink
Add test case for #249
Browse files Browse the repository at this point in the history
Signed-off-by: William Desportes <williamdes@wdes.fr>
  • Loading branch information
williamdes committed Dec 31, 2019
1 parent 8a9b8fc commit 38afaea
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/Utils/QueryTest.php
Expand Up @@ -598,6 +598,20 @@ public function testReplaceClauseOnlyKeyword()
);
}

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()));
Expand Down

0 comments on commit 38afaea

Please sign in to comment.