I have a .env file containing my database connection details, as is normal for Laravel 5. I want to override these for testing, which I can do in phpunit.
.env
phpunit.
I did all the steps in @Sambhu Singh answer as well as followed his link. But didn't work for me in L5.5
When migrating, adding/setting APP_ENV to 'testing' in front of the artisan command worked for me:
APP_ENV=testing php artisan migrate --database=sqlite_testing