Open Defrothew opened 3 years ago
I disagree with that. phpunit.xml
is great for environment variables that you never want to change between test environments (hash rounds, etc.), but can be problematic if you do have per-developer settings for testing.
You wouldn’t want to store Stripe keys in phpunit.xml
, some developers may use host-available MySQL, some might use Docker or Sail, you may want to use SQLite locally.
From memory, phpunit.xml
Will take precedence over any .env
file values.
That said, I think it’s sufficient to just put this in your project ignore rather than the default project template.
Most applications don't have a
.env.testing
. If you setup your PHPUnit configuration; you shouldn't a need for a testing env.