vscode-phpunit icon indicating copy to clipboard operation
vscode-phpunit copied to clipboard

Red exclamation on every test, no logs.

Open MilesHart opened this issue 5 years ago • 4 comments

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.

MilesHart avatar Jul 25 '20 04:07 MilesHart

I have the same problem. I tried setting all different combinations of settings to no avail.

siburny avatar Dec 05 '20 01:12 siburny

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"

siburny avatar Dec 05 '20 02:12 siburny

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.

MilesHart avatar Dec 18 '20 09:12 MilesHart

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

tyler36 avatar Jan 18 '21 04:01 tyler36

try version 3.0

recca0120 avatar Dec 06 '22 22:12 recca0120