コード例 #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);
 }
コード例 #2
0
ファイル: ListPosts.php プロジェクト: ulff/phpers-demo
 public function execute(Command $command, Responder $responder)
 {
     $projections = $this->projectionStorage->find('post-list');
     $responder->postsListedSuccessfully($projections);
 }