mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
Adding test cases to Containable, disproves and closes #4872
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7230 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
64d49c8afc
commit
9746c713fa
1 changed files with 8 additions and 0 deletions
|
@ -3272,6 +3272,14 @@ class ContainableTest extends CakeTestCase {
|
|||
'Comment' => array()
|
||||
));
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$this->Article->contain(false, array('User' => array('fields' => 'user'), 'Comment'));
|
||||
$result = $this->Article->find('all');
|
||||
$this->assertTrue(Set::matches('/Article[id=1]', $r));
|
||||
$this->assertTrue(Set::matches('/User[user=mariano]', $r));
|
||||
$this->assertTrue(Set::matches('/Comment[article_id=1]', $r));
|
||||
|
||||
$this->Article->resetBindings();
|
||||
}
|
||||
/**
|
||||
* containments method
|
||||
|
|
Loading…
Reference in a new issue