You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
(Note that DB_DATABASE is set to my_app_testing...)
Now your tests are looking good and you want to go on with some browser tests using dusk.
You use the DatabaseTruncation trait for your browser test.
uses(
DatabaseTruncation::class
)->in('Browser');
Your first browser test is looking fine, you run php artisan dusk and now oops your completely database was truncated.
Thats cause dusk uses the .env file by default. I would say it makes a lot more sense if dusk would use the phpunit.xml environment variables. Maybe if there is a .env.dusk.local file then it should use this one instead. But please don't use the normal .env file by default...
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Following scenario:
You start working on your tests, you set up the
phpunit.xml
file and you set the env variables for instance like so:(Note that DB_DATABASE is set to my_app_testing...)
Now your tests are looking good and you want to go on with some browser tests using dusk.
You use the DatabaseTruncation trait for your browser test.
Your first browser test is looking fine, you run
php artisan dusk
and now oops your completely database was truncated.Thats cause dusk uses the
.env
file by default. I would say it makes a lot more sense if dusk would use thephpunit.xml
environment variables. Maybe if there is a.env.dusk.local
file then it should use this one instead. But please don't use the normal.env
file by default...Beta Was this translation helpful? Give feedback.
All reactions