Permalink
Browse files

Merge pull request #82 from tightenco/memoize-mailer

Memoize mailer.
  • Loading branch information...
mattstauffer committed Oct 13, 2017
2 parents 3c95941 + 248e904 commit 03fd1da7917989b73dfcfc8397d2b63519dae7e6
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 03fd1da

Please sign in to comment.