public function then(array $thens) { $this->testCase->assertEquals($thens, $this->post->getRecordedEvents()); $this->post->clearRecordedEvents(); return $this; }
/** * {@inheritdoc} */ public function save(Post $post) { $recordedEvents = $post->getRecordedEvents(); $this->eventStore->appendEvents($post->getId(), $recordedEvents); $this->eventBus->publish($recordedEvents); }