You are here

public function PHPUnit_Framework_ExceptionWrapper::__toString in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php \PHPUnit_Framework_ExceptionWrapper::__toString()

Return value

string

Overrides PHPUnit_Framework_Exception::__toString

File

vendor/phpunit/phpunit/src/Framework/ExceptionWrapper.php, line 77

Class

PHPUnit_Framework_ExceptionWrapper
Wraps Exceptions thrown by code under test.

Code

public function __toString() {
  $string = PHPUnit_Framework_TestFailure::exceptionToString($this);
  if ($trace = PHPUnit_Util_Filter::getFilteredStacktrace($this)) {
    $string .= "\n" . $trace;
  }
  if ($this->previous) {
    $string .= "\nCaused by\n" . $this->previous;
  }
  return $string;
}