PHP enthusiast embracing quality tools, AI exploration, and knowledge sharing through articles. Automation is my playground, always learning and innovating.
Ok, I was able to replicate your problem with your YML file.
The difference is that the phpunit is executed via command line and dusk is executed with the webserver (php artisan serve). The problem is to pass the env to the right process.
With phpunit is enough to set the env before executing the command.
With dusk , you need to set the env variables before to launch the webserver.
Try to take a look this one: github.com/roberto-butti/laravel7-...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Ok, I was able to replicate your problem with your YML file.
The difference is that the phpunit is executed via command line and dusk is executed with the webserver (php artisan serve). The problem is to pass the env to the right process.
With phpunit is enough to set the env before executing the command.
With dusk , you need to set the env variables before to launch the webserver.
Try to take a look this one:
github.com/roberto-butti/laravel7-...