From fed704cd3fbc4ccc512efe69b853b395c095a198 Mon Sep 17 00:00:00 2001 From: Taylor Otwell Date: Tue, 17 Aug 2021 09:24:28 -0500 Subject: [PATCH] document assertNotOutgoing --- mocking.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mocking.md b/mocking.md index e0031f53dec..a77e9ff1f6a 100644 --- a/mocking.md +++ b/mocking.md @@ -399,6 +399,14 @@ When calling the `Mail` facade's assertion methods, the mailable instance accept $mail->hasBcc('...'); }); +You may have noticed that there are two methods for asserting that mail was not sent: `assertNotSent` and `assertNotQueued`. Sometimes you may wish to assert that no mail was sent **or** queued. To accomplish this, you may use the `assertNothingOutgoing` and `assertNotOutgoing` methods: + + Mail::assertNothingOutgoing(); + + Mail::assertNotOutgoing(function (OrderShipped $mail) use ($order) { + return $mail->order->id === $order->id; + }); + ## Notification Fake