I am running tests in PhpStorm and I get this error. Does anyone know what on earth could be causing it?
PHP Fatal error: Class 'PHPUnit_TextUI_ResultPrinter' not found in C:\Users\administrator1\AppData\Local\Temp\ide-phpunit.php on line 249
I run tests in other projects - that also utilise ide-phpunit.php
and they run just fine.
PHPUnit InstallationThe first command creates a folder in your current directory, test-project and the second command moves into it. The last command starts an interactive shell. Follow the prompt, filling in the details as required (the default values are fine).
To verify PHPUnit has been installed type phpunit --version in command prompt. You should get something like PHPUnit x.y.z by Sebastian Bergmann and contributors .
I had the same issue with Ubuntu 16.10, phpStorm 2017.2 and Laravel 5.5
Fixed it by uninstalling phpunit from my Ubuntu-system with
sudo apt-get remove phpunit sudo apt-get install --autoremove
or for mac:
brew uninstall phpunit brew install phpunit
My PhpStorm configuration (File -> Settings -> Languages & Frameworks -> PHP -> Test Frameworks):
Works great, now!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With