3

When selecting debug within PhpStorm, I receive the following error:

PHP Fatal error: Class 'PHPUnit_TextUI_ResultPrinter' not found in

It seems as if there is no standard way of solving this error. I am confused. Is there a program that debugs PhpStorm for me? A debugger for the debugger.

I am new to PhpStorm. If anyone has a solution, please feel free to pitch in.

LazyOne
  • 158,824
  • 45
  • 388
  • 391
user7293417
  • 107
  • 1
  • 2
  • 12
  • 1
    Possible duplicate of [Phpunit error in PhpStorm](http://stackoverflow.com/questions/31557371/phpunit-error-in-phpstorm) – Duane Lortie Feb 15 '17 at 22:00
  • 2
    What are you trying to do in first place? Just debugging PHP code .. or actually running PHPUnit tests? – LazyOne Feb 15 '17 at 22:07
  • Thank you both for the reply. I am just trying to debug the PHP code/Drupal file. I went to settings, under PHPUnit I select "Use Composer autoloader" and within "Path to Script" I target C:\php\php.exe. When I select debug, the error appears. However, when I select "Path to phpunit.phar" I target C:\inetpub\wwwroot\drupalfolder\phpunit.phar and when I debug, I receive a different error. The error says PHP Fatal error: Class 'Drupal\simpletest\WebTestBase' not found in I cant see a workaround this. If you can help me, I really need help, just to allow me to debug this file. Thank you. – user7293417 Feb 16 '17 at 14:13
  • @DuaneLortie I did that, and the error still appears saying "PHPUnit_TextUI_ResultPrinter" not found. – user7293417 Feb 16 '17 at 20:43
  • 2
    I'm getting the same error while I run tests in PHPStorm 2016.3.2. I have phpunit 6.0.7 and PHP 7.1.2. – Piotr Czyż Mar 01 '17 at 06:03

1 Answers1

2

I solved this by removing this from my phpunit.xml file:

     printerClass="PHPUnit_TextUI_ResultPrinter"

You find it in this tag:

<phpunit
...
>
Jaron
  • 21
  • 2