Exemplo n.º 1
0
 function it_should_update_post_list_projection(ProjectionStorage $projectionStorage)
 {
     $event = new PostWasPublished(PostId::generate(), 'title', 'content', new \DateTime());
     $projectionStorage->save(Argument::type(PostListProjection::class))->shouldBeCalled();
     $this->when($event);
 }
Exemplo n.º 2
0
 public function execute(Command $command, Responder $responder)
 {
     $projections = $this->projectionStorage->find('post-list');
     $responder->postsListedSuccessfully($projections);
 }