Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PhpStorm with PHPUnit: PHP_CodeCoverage_Filter not found

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?

like image 659
Deproblemify Avatar asked Jun 13 '16 18:06

Deproblemify


1 Answers

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.

like image 170
Deproblemify Avatar answered Nov 05 '22 21:11

Deproblemify