Пример #1
0
 /**
  * Make sure we remember the objects that are not currently add()ed
  * but might be in persistent storage.
  *
  * @test
  */
 public function removeRetainsObjectForObjectsNotInCurrentSession()
 {
     $object = $this->getMock('Tx_Extbase_DomainObject_AbstractDomainObject');
     // if the object is not currently add()ed, it is not new
     $object->expects($this->once())->method('_isNew')->will($this->returnValue(FALSE));
     $this->repository->_set('objectType', get_class($object));
     $this->repository->remove($object);
     $this->assertTrue($this->repository->getRemovedObjects()->contains($object));
 }