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:
mariano.iglesias 2008-06-21 23:52:38 +00:00
parent 64d49c8afc
commit 9746c713fa

View file

@ -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