Source: blog.deleu.dev

PHPUnit with Bref
One thing I learned to love with Docker was the easy ability to run phpunit with the exact same environment that will be used in production. Whenever I'm setting up a release pipeline, I like to build a Docker image, start a container from that image, enter it and run the project test code.

Yes, if one of my dev dependencies is not actually a dev dependency things can still break.

But the point is to minimize, as much as possible, the difference between production and the test environment.

Bref comes with a handy Docker image for tests which we can find at https://hub.docker.com/r/bref/php-74.
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