Bug? Mail::assertQueued working for one test but not another #54358
Replies: 2 comments
-
It seems to be coming down to that the When I dump the
The second one shown had two emails go out in the test. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Never mind! Typo. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi, posting here rather than reporting a bug.
I have two tests that mail out (not notifiy) messages to users.
In one test,
Mail::assertQueued($mailable)
is showing as true (this is expected).In a second test,
Mail::assertQueued($mailable_2)
is showing as false (this is not expected).In the second test I can see that it is, in fact, queued with
dd($this->manager)
. I set$this->manager = Mail::fake()
at setup of the test. The results ofdd
show:It is showing the mailable in the
queuedMailables
. Even when I runMail::assertQueuedCount(1);
the test passes.But,
Mail::assertQueued(SendPasswordResetLink::class);
does not pass:The two mailables are identical in structure and differ only in mail content.
Why does this happen?
Additionally:
dd(Mail::queued(SendPasswordResetLink::class)->count());
produces 0.dd(Maill:hasQueued(SendPasswordResetLink::class));
is false.Mail::assertOutgoingCount(1);
passes.And, drumroll...
Mail::assertNothingQueued();
fails.Beta Was this translation helpful? Give feedback.
All reactions