logo

Watch out for this when testing Artisan commands

A weird reason for a failing test

Joel Clermont
Joel Clermont
2026-07-10

A small change to how you write an Artisan command test can make it fail, even though the command itself works perfectly.

In this video, I make one innocent-looking refactor to a real test, watch the assertions fall apart, and then dig into the framework source to understand why the command never actually ran.

Watch Now (6 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. Build up your testing skills by adding tests to a non-trivial application in our testing workshop.

Toss a coin in the jar if you found this helpful.
Want a tip like this in your inbox every weekday? Sign up below 👇🏼
email
No spam. Only real-world advice.