We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 023b0fc commit 6298141Copy full SHA for 6298141
PHPUnit/TextUI/ResultPrinter.php
@@ -274,6 +274,20 @@ protected function printDefectTrace(PHPUnit_Framework_TestFailure $defect)
274
$defect->thrownException()
275
)
276
);
277
+
278
+ $e = $defect->thrownException();
279
+ if (method_exists($e, 'getPrevious')) {
280
+ //php >= 5.3, exceptions may have a previous cause
281
+ $e = $e->getPrevious();
282
+ while ($e) {
283
+ $this->write(
284
+ "\nCaused by\n" .
285
+ PHPUnit_Util_Filter::getFilteredStacktrace($e)
286
+ );
287
288
+ }
289
290
291
}
292
293
/**
0 commit comments