Bonjour,

Alors voila, j'ai un soucis avec la gestion des tests unitaires avec phpstorm, j'ai configuré correctement mon environnement de déploiement, mon interpréteur php (j'utilise Vagrant), l'autoloading avec composer, tout est ok.

Et lorsque je lance mes tests, phpstorm me lance l'erreur suivante :

ssh://vagrant@127.0.0.1:2222/usr/bin/php /home/vagrant/.phpstorm_helpers/phpunit.php --no-configuration TestTest /var/www/tests/TestTest.php
Testing started at 02:45 ...
PHP Fatal error:  Call to undefined method PHP_CodeCoverage_Filter::addFileToBlacklist() in /home/vagrant/.phpstorm_helpers/phpunit.php on line 270

Fatal error: Call to undefined method PHP_CodeCoverage_Filter::addFileToBlacklist() in /home/vagrant/.phpstorm_helpers/phpunit.php on line 270

Process finished with exit code 255

Si quelqu'un a une idée, je suis vraiment preneur !

Merci d'avance

3 réponses


tleb
Réponse acceptée

Salut,

Je pense qu'il s'agit d'un problème de version. Tu devrais vérifier la version de PHPUnit.

Dryzix
Auteur

Cela peut signifier que c'est phpstorm qui est trop "ancien" ?

Car quand j'update phpunit, j'ai une nouvelle erreur dans le même genre :

PHP Fatal error:  Class IDE_PHPUnit_Framework_TestListener contains 1 abstract method and must therefore be declared abstract or implement the remaining methods (PHPUnit_Framework_TestListener::addWarning) in /home/vagrant/.phpstorm_helpers/phpunit.php on line 277
Dryzix
Auteur

C'est bon j'ai mis a jour ma version de phpstorm et tout fonctionne correctement, merci beaucoup !