Skip to content

Commit

Permalink
Adding a test that fails for ticket #1762
Browse files Browse the repository at this point in the history
Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information
Daniel Feinberg authored and markstory committed Sep 8, 2011
1 parent 73a6ebe commit 95b275d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion cake/tests/cases/libs/model/behaviors/containable.test.php
Expand Up @@ -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'
);

/**
Expand Down Expand Up @@ -3406,6 +3406,21 @@ function testResetAddedAssociation() {
$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);
}

/**
Expand Down

0 comments on commit 95b275d

Please sign in to comment.