/** * @test */ public function it_holds_a_markdown_string() { $id = CommitteeId::generate(); $event = new CommitteePageChanged($id, '# Title\\nPlain text'); $this->assertEquals($id, $event->committeeId()); $this->assertEquals('# Title\\nPlain text', $event->page()); }
public function whenCommitteePageChanged(CommitteePageChanged $event) { $committee = $this->committees->find((string) $event->committeeId()); $committee = $committee->changeCommitteePage($event->page(), $this->markDownConverter->convertToHtml($event->page())); $this->committees->save($committee); }
protected function applyCommitteePageChanged(CommitteePageChanged $event) { $this->email = $event->page(); }