示例#1
0
 /**
  * test that a plugin model as the 'with' model doesn't have issues
  *
  * @return void
  */
 public function testDeleteLinksWithPLuginJoinModel()
 {
     $this->loadFixtures('Boat', 'boatsTag', 'Tag');
     $Boat = new Boat();
     $Boat->unbindModel(array('hasAndBelongsToMany' => array('Tag')), false);
     unset($Boat->Tag, $Boat->BoatTags);
     $Boat->bindModel(array('hasAndBelongsToMany' => array('Tag' => array('with' => 'TestPlugin.boatsTag'))), false);
     $Boat->boatsTag->order = null;
     $this->assertTrue($Boat->delete(1));
 }