I'm running into issues trying to use PHPUnit and I'm not entirely sure why. I have two problems, essentially;
PHPUnit won't seem to actually override the settings that Laravel should pick up (by way of the <php> block in the phpunit.xml file or the .env.testing file, neither work)
It doesn't seem to be able to use XDebug to run code coverage reports. I use Pest over the top of PHPUnit and it keeps reporting that it couldn't find/use XDebug for Coverage, despite it being enabled and set to develop,coverage,debug,profile mode in my xdebug.ini file in /etc/php.d/ on a Remi-based PHP install (Rocky Linux 8.5 Docker image).
Find the relevant docker-compose.yml, .env.testing and phpunit.xml at rpa.st/XOLA
@Sinnbeck Not sure if it's relevant, but when I run this and explicitly specify APP_ENV on the command-line while running the tests, it gets the right app.env config var.
[root@f21cf9d4680a html]# vendor/bin/phpunit tests/Feature/Http/Controllers
PHPUnit 9.5.14 by Sebastian Bergmann and contributors.
"production"
[root@f21cf9d4680a html]# APP_ENV=testing vendor/bin/phpunit tests/Feature/Http/Controllers
PHPUnit 9.5.14 by Sebastian Bergmann and contributors.
"testing"