title: Laravel 5.8 .env.testing file is not working
body: <p>I created a .env.testing file with my credentials, everything the same as .env besides a different table name for the database.</p>
  
  <p>I tried <code>php artisan config:clear</code> which deletes the cached config file in <code>bootstrap/cache/config.php</code> and it broke the database connection. If I re-cache the file by running <code>php artisan config:cache</code> the cached file is back, but without the credentials in the .env.testing file. When I rerun PHPUnit, it connects to the wrong DB, the DB name that is stored in .env not .env.testing.</p>
  
  <p>Is this for real? Did the latest Laravel release break test environments?</p>
  
  <p>Here is what the docs read: (found here: <a href="https://laravel.com/docs/5.8/testing" rel="noreferrer">https://laravel.com/docs/5.8/testing</a>)</p>
  
  <p>"You are free to define other testing environment configuration values as necessary. The testing environment variables can be configured in the phpunit.xml file, but make sure to clear your configuration cache using the config:clear Artisan command before running your tests!</p>
  
  <p>Also, you may create a .env.testing file in the root of your project. This file will override the .env file when running PHPUnit tests or executing Artisan commands with the  --env=testing option."</p>
  
  <p><strong><em>UPDATE</em></strong></p>
  
  <p>I finally was able to override the database that is stated in the .env by adding the database override in the phpunit.xml file; the .env.testing is still not working. The docs are misleading at the least.</p>