Skip to content
Permalink
Browse files

Added test case for fix in e1738c8

  • Loading branch information...
scottharwell committed Feb 5, 2012
1 parent 12bf134 commit dddcdd105ed28d82c5f697b71939bb34c45fe9e7
Showing with 23 additions and 0 deletions.
  1. +23 −0 lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -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.
You can’t perform that action at this time.