public function html() { if (!$this->hasHtml()) { throw new MailCatcherException('This message has no HTML body.'); } return $this->mailCatcher->messageHtml($this->id); }
function it_should_return_its_html_body() { $this->mailCatcher->message('id')->willReturn(['formats' => ['html']]); $this->mailCatcher->messageHtml('id')->willReturn('body'); $this->html()->shouldReturn('body'); }