mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding test to show correct functioning of containable + field() + recursive = -1. Closes #409
This commit is contained in:
parent
029d2581af
commit
f86d0de5ee
1 changed files with 11 additions and 0 deletions
|
@ -3626,6 +3626,17 @@ class ContainableBehaviorTest extends CakeTestCase {
|
|||
|
||||
$this->_fixtures[$this->_fixtureClassMap['User']]->drop($db);
|
||||
}
|
||||
/**
|
||||
* test that autoFields doesn't splice in columns that aren't part of the join.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function testAutoFieldsWithRecursiveNegativeOne() {
|
||||
$this->Article->recursive = -1;
|
||||
$result = $this->Article->field('title', array('Article.title' => 'First Article'));
|
||||
$this->assertNoErrors();
|
||||
$this->assertEqual($result, 'First Article', 'Field is wrong');
|
||||
}
|
||||
/**
|
||||
* containments method
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue