Skip to content

Commit

Permalink
Added test case for fix in e1738c8
Browse files Browse the repository at this point in the history
  • Loading branch information
scottharwell committed Feb 5, 2012
1 parent 12bf134 commit dddcdd1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions lib/Cake/Test/Case/Model/ModelReadTest.php
Expand Up @@ -7784,4 +7784,27 @@ public function testGetVirtualField() {
$this->assertEquals($Post->getVirtualField('other_field'), $Post->virtualFields['other_field']);
$this->assertEquals($Post->getVirtualField('Post.other_field'), $Post->virtualFields['other_field']);
}


/**
* test that checks for error when NOT condition passed in key and a 1 element array value
*
* @return void
*/
public function testNotInArrayWithOneValue() {
$this->loadFixtures('Article');
$Article = new Article();
$Article->recursive = -1;

$result = $Article->find(
'all',
array(
'conditions' => array(
'Article.id NOT' => array(1)
)
)
);

$this->assertTrue(is_array($result) && !empty($result));
}
}

0 comments on commit dddcdd1

Please sign in to comment.