I am trying to use PHPUnit in PhpStorm (on a Mac). Therefore I tried adding the pear
path and phpunit
path to the include path of PhpStorm (the ones I found through which pear
on the command line) - it tells me that phpunit was not found.
I also tried to use PHPUnit with the custom autoloader generated by composer (the phpunit
package is installed), I then receive another error:
Fatal error: Class 'PHP_CodeCoverage_Filter' not found
If I run phpunit on the console normally everything works:
phpunit --bootstrap vendor/autoload.php tests/*Test.php
What am I doing wrong?
The problem was that I used the default php interpreter which phpStorm suggested to me. This was version PHP 5.5
though and not the 5.6
version in my terminal.
After changing the interpreter to an up-to-date php version (5.6
or 7.0
) it worked with the PHAR Option.
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