Closed guitarbien closed 7 years ago
I'm sure Adam will touch on it at some point but there is a Queue::fake()
method that works similar to Mail::fake()
wow thank you ! I didn't notice that, I'll give it a try.
I think it's like with Stripe. Test your queue implementation(s) with contract tests, and use a Fake implementation anywhere else.
Hi, everyone
I'm wondering if we use queue or job to handle a business logic, should we have to care about adding to the queue correctly and write the test for that, or we could use something like FakeQueue for testing is enough ?
What if we use
Mail::queue()
orMail::later()
to send a mail. Shouldmail::assertSent()
work with that ?Wish Adam will talk about queue / job implement and testing detail in the future.
Thanks.