You might think adding sleep()
inside a test is a dirty hack to fix a flaky test, and I would normally agree with you. But as developers love saying... "it depends"
In today's video, I'll show a scenario where it is actually a useful and valid testing strategy.
And after watching, don't forget to subscribe to our YouTube channel, so you don't miss future videos.
Here to help,
Joel
P.S. Want to learn how to write effective tests, even in an older untested Laravel app? This is covered in our Laravel testing workshop.