/** @test */ public function it_can_create() { $this->markTestIncomplete('Post::create() does not exist.'); $id = 'my-id'; $this->scenario->when(function () use($id) { return Post::create($id); })->then([new PostWasCreated($id)]); }
public function handle(CreatePost $command) { $post = Post::create($command->id); $this->getPostRepository()->save($post); }