diff --git a/src/Illuminate/Support/Testing/Fakes/MailFake.php b/src/Illuminate/Support/Testing/Fakes/MailFake.php index 48392d1d1b9d..429f089bacc1 100644 --- a/src/Illuminate/Support/Testing/Fakes/MailFake.php +++ b/src/Illuminate/Support/Testing/Fakes/MailFake.php @@ -36,9 +36,15 @@ public function assertSent($mailable, $callback = null) return $this->assertSentTimes($mailable, $callback); } + $message = "The expected [{$mailable}] mailable was not sent."; + + if (count($this->queuedMailables) > 0) { + $message .= ' Did you mean to use assertQueued() instead?'; + } + PHPUnit::assertTrue( $this->sent($mailable, $callback)->count() > 0, - "The expected [{$mailable}] mailable was not sent." + $message ); }