Laravel - Getting Started - Environment
When running tests, Laravel will automatically set the configuration environment to
testing because of the environment variables defined in the
phpunit.xml file. Laravel also automatically configures the session and cache to the
array driver while testing, meaning no session or cache data will be persisted while testing.
You are free to define other testing environment configuration values as necessary. The
testing environment variables may be configured in your application's
phpunit.xml file, but make sure to clear your configuration cache using the
config:clear Artisan command before running your tests!