โ˜… Improving assertions on Laravel fakes

1 ยท Freek Van der Herten ยท June 24, 2019, 8:21 a.m.
Laravel has some cool fakes that can help you with testing your code. In this short blog post, I'd like to show you a little tip on how to get better feedback when a test that contains such a fake fails. How to use a fake # Let's start with an example of a fake. You can skip to the next section if you've already worked with fakes. Imagine your application sends a mail. You want to test if that mail is being sent correctly. The first step would be to set up the fake. Laravel makes this incredibl...