Skip to content
This repository
Browse code

Adding a test that fails for ticket #1762

Signed-off-by: mark_story <mark@mark-story.com>
  • Loading branch information...
commit 95b275dc3b279a665666e0c0c9f9557691d823b3 1 parent 73a6ebe
authored August 31, 2011 markstory committed September 07, 2011
17  cake/tests/cases/libs/model/behaviors/containable.test.php
@@ -36,7 +36,7 @@ class ContainableBehaviorTest extends CakeTestCase {
36 36
  */
37 37
 	var $fixtures = array(
38 38
 		'core.article', 'core.article_featured', 'core.article_featureds_tags', 'core.articles_tag', 'core.attachment', 'core.category',
39  
-		'core.comment', 'core.featured', 'core.tag', 'core.user'
  39
+		'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'
40 40
 	);
41 41
 
42 42
 /**
@@ -3406,6 +3406,21 @@ function testResetAddedAssociation() {
3406 3406
 		$this->assertEqual($expected, array_keys($result));
3407 3407
 
3408 3408
 		$this->assertTrue(empty($this->Article->hasMany['ArticlesTag']));
  3409
+		
  3410
+		$this->JoinA =& ClassRegistry::init('JoinA');
  3411
+		$this->JoinB =& ClassRegistry::init('JoinB');
  3412
+		$this->JoinC =& ClassRegistry::init('JoinC');
  3413
+		
  3414
+		$this->JoinA->Behaviors->attach('Containable');
  3415
+		$this->JoinB->Behaviors->attach('Containable');
  3416
+		$this->JoinC->Behaviors->attach('Containable');
  3417
+		
  3418
+		$this->JoinA->JoinB->find('all', array('contain' => array('JoinA')));
  3419
+		$this->JoinA->bindModel(array('hasOne' => array('JoinAsJoinC' => array('joinTable' => 'as_cs'))), false);
  3420
+		$result = $this->JoinA->hasOne;
  3421
+		$this->JoinA->find('all');
  3422
+		$resultAfter = $this->JoinA->hasOne;
  3423
+		$this->assertEqual($result, $resultAfter);
3409 3424
 	}
3410 3425
 
3411 3426
 /**

0 notes on commit 95b275d

Please sign in to comment.
Something went wrong with that request. Please try again.