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); }
public function execute(Command $command, Responder $responder) { $projections = $this->projectionStorage->find('post-list'); $responder->postsListedSuccessfully($projections); }