mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-18 02:26:17 +00:00
Adding tests for HABTM unique key, disproves #3859
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6887 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
bf107d1886
commit
68234dd529
2 changed files with 6 additions and 1 deletions
|
@ -190,6 +190,11 @@ class ModelTest extends CakeTestCase {
|
|||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
||||
function testHabtmUniqueKey() {
|
||||
$model =& new Item();
|
||||
$this->assertFalse($model->hasAndBelongsToMany['Portfolio']['unique']);
|
||||
}
|
||||
|
||||
function testHasManyLimitOptimization() {
|
||||
$this->loadFixtures('Project', 'Thread', 'Message', 'Bid');
|
||||
$Project =& new Project();
|
||||
|
|
|
@ -447,7 +447,7 @@ class Portfolio extends CakeTestModel {
|
|||
class Item extends CakeTestModel {
|
||||
var $name = 'Item';
|
||||
var $belongsTo = array('Syfile' => array('counterCache' => true));
|
||||
var $hasAndBelongsToMany = array('Portfolio');
|
||||
var $hasAndBelongsToMany = array('Portfolio' => array('unique' => false));
|
||||
}
|
||||
class ItemsPortfolio extends CakeTestModel {
|
||||
var $name = 'ItemsPortfolio';
|
||||
|
|
Loading…
Add table
Reference in a new issue