Search code examples
laravelemailtestingqueuetdd

How to Write a unit test with laravel queue mail?


I already finish the code to sending the mail by queue, and it`s working fine, and I want to write a test for it (just want to test the mail that it should be send out normally without failing by queue, and to the right person), but how?

Mail::to($user->email)->queue(new Welcome($user));

Solution

  • Now I'm using the MailTracking to test the mail https://gist.github.com/anonymous/6e802e56af1f19d53464d667b3e6aa48