mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 17:16:18 +00:00
Adding a test that fails for ticket #1762
Signed-off-by: mark_story <mark@mark-story.com>
This commit is contained in:
parent
73a6ebea8d
commit
95b275dc3b
1 changed files with 16 additions and 1 deletions
|
@ -36,7 +36,7 @@ class ContainableBehaviorTest extends CakeTestCase {
|
||||||
*/
|
*/
|
||||||
var $fixtures = array(
|
var $fixtures = array(
|
||||||
'core.article', 'core.article_featured', 'core.article_featureds_tags', 'core.articles_tag', 'core.attachment', 'core.category',
|
'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->assertEqual($expected, array_keys($result));
|
||||||
|
|
||||||
$this->assertTrue(empty($this->Article->hasMany['ArticlesTag']));
|
$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);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Add table
Reference in a new issue