Adding a test that fails for ticket #1762

Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
Daniel Feinberg 2011-08-31 00:10:59 -06:00 committed by mark_story
parent 73a6ebea8d
commit 95b275dc3b

View file

@ -36,7 +36,7 @@ class ContainableBehaviorTest extends CakeTestCase {
*/
var $fixtures = array(
'core.article', 'core.article_featured', 'core.article_featureds_tags', 'core.articles_tag', 'core.attachment', 'core.category',
'core.comment', 'core.featured', 'core.tag', 'core.user'
'core.comment', 'core.featured', 'core.tag', 'core.user', 'core.join_a', 'core.join_b', 'core.join_c', 'core.join_a_c', 'core.join_a_b'
);
/**
@ -3406,6 +3406,21 @@ class ContainableBehaviorTest extends CakeTestCase {
$this->assertEqual($expected, array_keys($result));
$this->assertTrue(empty($this->Article->hasMany['ArticlesTag']));
$this->JoinA =& ClassRegistry::init('JoinA');
$this->JoinB =& ClassRegistry::init('JoinB');
$this->JoinC =& ClassRegistry::init('JoinC');
$this->JoinA->Behaviors->attach('Containable');
$this->JoinB->Behaviors->attach('Containable');
$this->JoinC->Behaviors->attach('Containable');
$this->JoinA->JoinB->find('all', array('contain' => array('JoinA')));
$this->JoinA->bindModel(array('hasOne' => array('JoinAsJoinC' => array('joinTable' => 'as_cs'))), false);
$result = $this->JoinA->hasOne;
$this->JoinA->find('all');
$resultAfter = $this->JoinA->hasOne;
$this->assertEqual($result, $resultAfter);
}
/**