vscode-phpunit
vscode-phpunit copied to clipboard
Red exclamation on every test, no logs.
php version 7.3.1
phpunit version 8.1.3
Every test returned passed in the console. However the explorer and inline code shows a red exclamation.
I did notice before this issue I had a duplicate in the explorer which I fixes with the new settings in the wiki.
I have the same problem. I tried setting all different combinations of settings to no avail.
I figured it out: you have to specify phpunit path not to the executable in the bin folder but directly to the phpunit file itself. I also had to explicitly specify the php path.
I installed phpunit globally via composer so my path is like this:
"phpunit.php": "C:\\php\\php7.4.13\\php-win.exe",
"phpunit.phpunit": "c:\\Users\\Username\\AppData\\Roaming\\Composer\\vendor\\phpunit\\phpunit\\phpunit"
OK, managed to fix it. I'm surprise no one has hit this...
My path to the project had a space in the folder name.....
This should be raised as a bug.
Same issue. Red exclamation with no logs.
If I have the phpunit.xml file in the project root, everything works fine.
If I move phpunit.xml into a subfolder, and update the paths it fails.
I tried restarting between sessions. I'm using:
"phpunit.phpunit": "C:\\Users\\username\\Sites\\devdesktop\\project-1\\docroot\\vendor\\phpunit\\phpunit\\phpunit",
"phpunit.php": "C:/PHP/PHP-7.3/php.exe",
"phpunit.args": [
"--configuration",
"C:\\Users\\username\\Sites\\devdesktop\\project-1\\docroot\\phpunit.xml",
],
I tried toggling the phpunit.relativeFilePath setting too.
PHP: 7.3.24
PHPUnit: 8.5.8
VScode: 1.52.1
PHPunit Test explorer: 2.0.76
Test Explorer UI: 2.19.5
OS: Win10
try version 3.0