mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Add unit test
This commit is contained in:
parent
9e6120c86a
commit
ef8603e1a7
1 changed files with 21 additions and 0 deletions
|
@ -7943,6 +7943,27 @@ class ModelReadTest extends BaseModelTest {
|
|||
$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
|
||||
*
|
||||
|
|
Loading…
Add table
Reference in a new issue