Black Friday: the Laravel testing course is $149 instead of $249, through Dec 7. See the course →
logo

How to test that a model wasn't changed

One option I like to use

Joel Clermont
Joel Clermont
2026-04-24

From our daily Laravel tips email. Get the next one in your inbox.

Sometimes the most important thing to test is that nothing happened.

In today's video, I show a simple trick for proving a model wasn't changed, using just one assertion and zero mocking.

Watch Now (4 min)

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. If one testing trick made your day, imagine what a whole book of them could do. Grab the latest tips volume.

Want a tip like this in your inbox every weekday?

Each one takes less than 2 minutes to read. Join 4,000+ Laravel developers who already get them.

email
No spam. Only real-world advice.
Toss a coin in the jar if you found this helpful.