Skip to content

Commit

Permalink
Add tests covering basic use of <> in deleteAll()
Browse files Browse the repository at this point in the history
Refs #9253
  • Loading branch information
markstory committed Aug 14, 2016
1 parent a10bdb2 commit 3e16f89
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions lib/Cake/Test/Case/Model/ModelDeleteTest.php
Expand Up @@ -421,6 +421,20 @@ public function testDeleteAll() {
$this->assertTrue($result, 'deleteAll returned false when all no records matched conditions. %s');
}

/**
* testDeleteAll diamond operator method
*
* @return void
*/
public function testDeleteAllDiamondOperator() {
$this->loadFixtures('Article');
$article = new Article();

$result = $article->deleteAll(array('Article.id <>' => 1));
$this->assertTrue($result);
$this->assertFalse($article->exists(2));
}

/**
* testDeleteAllUnknownColumn method
*
Expand Down

0 comments on commit 3e16f89

Please sign in to comment.