From 3e16f8911d3caaddb629e403fcda3d0abf0cae72 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sat, 13 Aug 2016 22:48:02 -0400 Subject: [PATCH] Add tests covering basic use of <> in deleteAll() Refs #9253 --- lib/Cake/Test/Case/Model/ModelDeleteTest.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lib/Cake/Test/Case/Model/ModelDeleteTest.php b/lib/Cake/Test/Case/Model/ModelDeleteTest.php index f26180847..60ce9970f 100644 --- a/lib/Cake/Test/Case/Model/ModelDeleteTest.php +++ b/lib/Cake/Test/Case/Model/ModelDeleteTest.php @@ -421,6 +421,20 @@ class ModelDeleteTest extends BaseModelTest { $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 *