Ejemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 public function createItem(EntityId $entityId, $entity)
 {
     $stateHistory = $this->stateRepository->find($entityId);
     return Item::reconstitute($entityId, $entity, $stateHistory);
 }
Ejemplo n.º 2
0
 function it_creates_an_item(EntityId $entityId, EntityId $entityId, StateRepository $stateRepository, State $state)
 {
     $stateRepository->find($entityId)->willReturn(array($state));
     $this->createItem($entityId, static::$entity)->shouldHaveType('Netzmacht\\Workflow\\Flow\\Item');
 }