My tests are running properly and all green when I run them without any particular flag:
phpunit --configuration /home/vagrant/code/phpunit.xml /home/vagrant/code/tests
When I enable process isolation, the tests are failing:
phpunit --configuration /home/vagrant/code/phpunit.xml /home/vagrant/code/tests --process-isolation
The error looks like this:
PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:234
Stack trace:
#0 /home/vagrant/code/routes/web.php(6): Illuminate\Support\Facades\Facade::__callStatic('get', Array)
#1 Standard input code(1653): require_once('/home/vagrant/c...')
#2 {main}
thrown in /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234
Fatal error: Uncaught RuntimeException: A facade root has not been set. in /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php:234
Stack trace:
#0 /home/vagrant/code/routes/web.php(6): Illuminate\Support\Facades\Facade::__callStatic('get', Array)
#1 Standard input code(1653): require_once('/home/vagrant/c...')
#2 {main}
thrown in /home/vagrant/code/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php on line 234
I already tried a few things from the 3 or 4 threads I found on Laracast or StackOverflow regarding that kind of exception but nothing works yet:
- Excluding routes from PHPUnit.xml
- Running phpunit from vendor/bin or the one included in the system
- etc.
Any idea about where to look for or check? I am running out of ideas.
Using latest Laravel 5.8 and PHPUnit 8.0.6