예제 #1
0
 /**
  * @test
  */
 public function deleteForDirtyModelWithOneToManyRelationToDirtyElementDoesNotCrash()
 {
     $uid = $this->testingFramework->createRecord('tx_oelib_test', array('composition' => 1));
     $this->testingFramework->createRecord('tx_oelib_testchild', array('parent' => $uid));
     /** @var Tx_Oelib_Tests_Unit_Fixtures_TestingModel $model */
     $model = $this->subject->find($uid);
     /** @var Tx_Oelib_Tests_Unit_Fixtures_TestingModel $relatedModel */
     $relatedModel = $model->getComposition()->first();
     $model->setTitle('foo');
     $relatedModel->setTitle('bar');
     $this->subject->delete($model);
 }