Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Adding a test for containable modifying return. Refs #1219

  • Loading branch information...
commit 3639f5211770e6b75a096fc02ca19470511611b3 1 parent 9f2d33a
@markstory markstory authored
Showing with 13 additions and 0 deletions.
  1. +13 −0 cake/tests/cases/libs/model/behaviors/containable.test.php
View
13 cake/tests/cases/libs/model/behaviors/containable.test.php
@@ -3637,6 +3637,19 @@ function testAutoFieldsWithRecursiveNegativeOne() {
$this->assertNoErrors();
$this->assertEqual($result, 'First Article', 'Field is wrong');
}
+
+/**
+ * test that find(all) doesn't return incorrect values when mixed with containable.
+ *
+ * @return void
+ */
+ function testFindAllReturn() {
+ $result = $this->Article->find('all', array(
+ 'conditions' => array('Article.id' => 999999999)
+ ));
+ $this->assertEqual($result, array(), 'Should be empty.');
+ }
+
/**
* containments method
*
Please sign in to comment.
Something went wrong with that request. Please try again.