Permalink
Browse files

Memoize mailer.

Fixes #81

Fix provided by @ejunker <3
  • Loading branch information...
mattstauffer committed Oct 13, 2017
1 parent 3c95941 commit 248e9049fd71fe23112992f8ba16b3f218d53daf
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/Testing/InteractsWithMail.php
@@ -18,7 +18,9 @@ private function setMailer(Mailer $mailer)
private function getMailer()
{
return $this->mailer ?: MailThief::getFacadeRoot();
return tap($this->mailer ?: MailThief::getFacadeRoot(), function ($mailer) {
$this->setMailer($mailer);
});
}
/**

0 comments on commit 248e904

Please sign in to comment.