Skip to content

Commit e382a1c

Browse files
committed
Adding test case for find(list) with recursive.
1 parent 6d87240 commit e382a1c

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

cake/tests/cases/libs/model/model_read.test.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6408,6 +6408,18 @@ function testGenerateFindList() {
64086408
4 => 'garrett (CakePHP)'
64096409
);
64106410
$this->assertEqual($result, $expected);
6411+
6412+
$TestModel =& new Article();
6413+
$TestModel->displayField = 'title';
6414+
$result = $TestModel->find('list', array(
6415+
'conditions' => array('User.user' => 'mariano'),
6416+
'recursive' => 0
6417+
));
6418+
$expected = array(
6419+
1 => 'First Article',
6420+
3 => 'Third Article'
6421+
);
6422+
$this->assertEqual($result, $expected);
64116423
}
64126424

64136425
/**

0 commit comments

Comments
 (0)