0
votes

for some reason I lost the option to run phpunit tests with my netbeans IDE (8.1). everything worked ok the last time I check (several months ago), but now the option to "test file" or "test focused method" don't appear any more when I right-click the code. (#2 in the image)

=> see image for screenshots showing everything (because of my low feedback until now, I had to upload everything just in one image..)

I installed phpunit through tools->plugins (tried to uninstalled and reinstall, it didn't work)

I have set the phpunit in tools->option->php->phpunit (#4 in the image)

I have set the project testing configuration to set phpunit as the test provider. (#3 & #1 in the image. In the past it worked without setting bootstrap and XML configuration, but now since it doesn't I tried clicking on "Generate". It didn't help)

I have phpunit installed on my computer and it is in my PATH (#5 in the image)

My test name does end with '*Test.php'

I tried to delete netbeans cache and reopened netbeans, it didn't work. by the way, debugging does work.

I tried downgrading to phpunit 3.7.10. didn't help

update: I recreated the entire project on another computer -> it works! I can run the the test. I still don't know why I can't run it on the original computer though.

Any suggestions what am I missing? If you require more logs/info let me know and I will update question.

1

1 Answers

0
votes

I found it.

Don't know why, but for some reason the composer 'vendor' folder caused this issue.

After renaming everything that is related to composer (composer.json, vendor folder and the lock file), I reopened netbeans, and the 'test file' option was finally enabled.

Wasted 6 hours looking for a solution. I hope this answer will save time for some people in the future.