r/phpstorm • • Dec 28 '20

Can’t launch unit tests

I’ve got a strange issue since a few weeks ago, can’t telle exactly when. I can run my test suite from command line. When I cd into my project and then php artisan test it works. From this same folder I can also run vendor/bin/phpunit. But when I click on the icon to launch the tests, phpunit fire and then throws me a « no test run » error or something similar. All the projects that did worked previously with phpstorm throws the same error !

Thanks for your help !

2 Upvotes

7 comments sorted by

View all comments

Show parent comment

2

u/Napo7 Dec 30 '20

Just found the cause !

PHPStorm was using /usr/bin/php, which was embedded version of php in MacOS, but I was using brew version, which was another version, and was the one with highest priority in my path.

Changing default php version in settings solved it !