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.

5
  • 1
    Possible duplicate of Phpunit error in PhpStorm Commented Feb 15, 2017 at 22:00
  • 2
    What are you trying to do in first place? Just debugging PHP code .. or actually running PHPUnit tests? Commented Feb 15, 2017 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. Commented Feb 16, 2017 at 14:13
  • @DuaneLortie I did that, and the error still appears saying "PHPUnit_TextUI_ResultPrinter" not found. Commented Feb 16, 2017 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. Commented Mar 1, 2017 at 6:03

1 Answer 1

3

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

     printerClass="PHPUnit_TextUI_ResultPrinter"

You find it in this tag:

<phpunit
...
>
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.