Permalink
Browse files

Fix mailer memoization to work without tap

  • Loading branch information...
mattstauffer committed Oct 15, 2017
1 parent 03fd1da commit ade59e0df5697d59e2ac89331d0ff0c0015e340b
Showing with 5 additions and 3 deletions.
  1. +5 −3 src/Testing/InteractsWithMail.php
@@ -18,9 +18,11 @@ private function setMailer(Mailer $mailer)
private function getMailer()
{
return tap($this->mailer ?: MailThief::getFacadeRoot(), function ($mailer) {
$this->setMailer($mailer);
});
if (! $this->mailer) {
$this->setMailer(MailThief::getFacadeRoot());
}
return $this->mailer;
}
/**

0 comments on commit ade59e0

Please sign in to comment.