function it_tells_when_entity_was_registered(Registry $registry, Identifier $identifier)
 {
     $entity = new EntityFake();
     $registry->isRegistered($entity)->willReturn(true);
     $identifier->isEntity($entity)->willReturn(true);
     $registry->register($entity)->willReturn();
     $this->register($entity);
     $this->isRegistered($entity)->shouldReturn(true);
 }
Exemple #2
0
 /**
  * @param $entity
  * @return bool
  * @throws RuntimeException
  */
 private function isChanged($entity)
 {
     return !$this->comparer->areEqual($entity, $this->registry->getSnapshot($entity));
 }