Skip to content

Commit

Permalink
Add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
jippi committed May 28, 2013
1 parent 9e6120c commit ef8603e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions lib/Cake/Test/Case/Model/ModelReadTest.php
Expand Up @@ -7943,6 +7943,27 @@ public function testNotInArrayWithOneValue() {
$this->assertTrue(is_array($result) && !empty($result));
}

/**
* test to assert that != in key together with a single element array will work
*
* @return void
*/
public function testNotEqualsInArrayWithOneValue() {
$this->loadFixtures('Article');
$Article = new Article();
$Article->recursive = -1;

$result = $Article->find(
'all',
array(
'conditions' => array(
'Article.id !=' => array(1)
)
)
);
$this->assertTrue(is_array($result) && !empty($result));
}

/**
* test custom find method
*
Expand Down

0 comments on commit ef8603e

Please sign in to comment.