Esempio n. 1
0
 /**
  * testDependentExclusiveDelete method
  *
  * @return void
  */
 public function testDependentExclusiveDelete()
 {
     $this->loadFixtures('Boat', 'Comment');
     $TestModel = new Boat10();
     $result = $TestModel->find('all');
     $this->assertEquals(4, count($result[0]['Comment']));
     $this->assertEquals(2, count($result[1]['Comment']));
     $this->assertEquals(6, $TestModel->Comment->find('count'));
     $TestModel->delete(1);
     $this->assertEquals(2, $TestModel->Comment->find('count'));
 }