Overwrite APP_ENV in PHPUnit
Important when you're using something like Docker where you inject the env variables directly into the environment rather than just pulling them from a
.env file with a PHP dotenv component.
Make sure to use
force="true" in your
<phpunit ...> <php> <env name="APP_ENV" value="test" force="true" /> ... </php> </phpunit>