Permalink
Browse files

removed check for php 5.3 when printing the cause of events

  • Loading branch information...
Matheus Degiovani
Matheus Degiovani committed May 28, 2012
1 parent 6298141 commit eea67103ab683d2111276bc8ea60600d9a7b577a
Showing with 7 additions and 11 deletions.
  1. +7 −11 PHPUnit/TextUI/ResultPrinter.php
@@ -275,18 +275,14 @@ protected function printDefectTrace(PHPUnit_Framework_TestFailure $defect)
)
);
$e = $defect->thrownException();
if (method_exists($e, 'getPrevious')) {
//php >= 5.3, exceptions may have a previous cause
$e = $defect->thrownException()->getPrevious();
while ($e) {
$this->write(
"\nCaused by\n" .
PHPUnit_Util_Filter::getFilteredStacktrace($e)
);
$e = $e->getPrevious();
while ($e) {
$this->write(
"\nCaused by\n" .
PHPUnit_Util_Filter::getFilteredStacktrace($e)
);
$e = $e->getPrevious();
}
}
}
}

0 comments on commit eea6710

Please sign in to comment.