mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
Adding test case for find(list) with recursive.
This commit is contained in:
parent
6d8724097e
commit
e382a1c63c
1 changed files with 12 additions and 0 deletions
|
@ -6408,6 +6408,18 @@ class ModelReadTest extends BaseModelTest {
|
|||
4 => 'garrett (CakePHP)'
|
||||
);
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$TestModel =& new Article();
|
||||
$TestModel->displayField = 'title';
|
||||
$result = $TestModel->find('list', array(
|
||||
'conditions' => array('User.user' => 'mariano'),
|
||||
'recursive' => 0
|
||||
));
|
||||
$expected = array(
|
||||
1 => 'First Article',
|
||||
3 => 'Third Article'
|
||||
);
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Reference in a new issue