Skip to content
This repository has been archived by the owner on Mar 14, 2024. It is now read-only.

Commit

Permalink
Memoize mailer.
Browse files Browse the repository at this point in the history
Fixes #81

Fix provided by @ejunker <3
  • Loading branch information
mattstauffer committed Oct 13, 2017
1 parent 3c95941 commit 248e904
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Testing/InteractsWithMail.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
}

/**
Expand Down

0 comments on commit 248e904

Please sign in to comment.