/** * testDeleteBoatBLinks method * * @return void */ public function testDeleteBoatBLinks() { $this->loadFixtures('Boat', 'boatsTag', 'Tag', 'User'); $TestModel = new BoatB(); $result = $TestModel->boatsTag->find('all'); $expected = array(array('boatsTag' => array('article_id' => '1', 'tag_id' => '1')), array('boatsTag' => array('article_id' => '1', 'tag_id' => '2')), array('boatsTag' => array('article_id' => '2', 'tag_id' => '1')), array('boatsTag' => array('article_id' => '2', 'tag_id' => '3'))); $this->assertEquals($expected, $result); $TestModel->delete(1); $result = $TestModel->boatsTag->find('all'); $expected = array(array('boatsTag' => array('article_id' => '2', 'tag_id' => '1')), array('boatsTag' => array('article_id' => '2', 'tag_id' => '3'))); $this->assertEquals($expected, $result); }