Change the way PHPStorm displays (unexpected) exceptions in phpunit tests

When I run tests in linux console I get a result like:

<Exception class>: <message>

<stack trace>

But in phpstorm I don't see the exception class. Am I doing something wrong or it's a phpstorm bug?

2 comments
Comment actions Permalink

I've got this same problem.  The documentation says that the test runner displays the raw output from PHPUnit, but clearly there is some parsing/filtering happening.

For example, when running PHPUnit from the command line, I receive this response followed by a stack trace:

PHPUnit 6.4-gf9396b66d by Sebastian Bergmann and contributors.

..E. 4 / 4 (100%)

Time: 329 ms, Memory: 16.00MB

There was 1 error:

1) Tests\Feature\TopicsTest::userCanCreateATopic
Illuminate\Database\Eloquent\MassAssignmentException: subject

 

In the Test Runner output window I get this response followed by a stack trace.

PHPUnit 6.4-gf9396b66d by Sebastian Bergmann and contributors.


subject

 

Filtering out the exception class in these results makes the failure message meaningless.

 

Is there a way to change this behavior?

0

Please sign in to leave a comment.