Category: Laravel

In the 7.x branch, Laravel added an artisan test command which acts as a wrapper for PHPUnit. It provides information about the tests as they're running and stops on the first failure unlike PHPUnit's default behavior of running all the tests and showing all the failures.

The following article will provide a brief overview of how we can use it and quickly compare it to phpunit.

When running our test suite with a failing test we’ll get the following output from phpunit. However, if we run the test using php artisan test we get the following nicer output.
Newsletter

Get the latest Laravel/PHP jobs, events and curated articles straight to your inbox, once a week

Fathom Analytics | Fast, simple and privacy-focused website analytics. Fathom Analytics | Fast, simple and privacy-focused website analytics.
Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future. Achieve superior email deliverability with ToastMail! Our AI-driven tool warms up inboxes, monitors reputation, and ensures emails reach their intended destination. Sign up today for a spam-free future.
Community Partners