How does one change database for development and testing on local system without editing the .env file each time?
I have found it quite inconvenient to
You can use a different .env file for each type of test. You can modify your tests/functional.suite.yml and tests/unit.suite.yml something like this:
class_name: FunctionalTester
modules:
enabled: [Laravel5, FunctionalHelper, Asserts]
config:
Laravel5:
environment_file: .env.testing
And this:
class_name: UnitTester
modules:
enabled: [Asserts, UnitHelper, Laravel5]
config:
Laravel5:
environment_file: .env.unittesting
Or you can simply modify your phpunit.xml and add environment vars like @Tijmen did above.