PHPUnit_Framework_TestFailure::getExceptionAsString PHP Метод

getExceptionAsString() публичный Метод

Returns a description for the thrown exception.
public getExceptionAsString ( ) : string
Результат string
    public function getExceptionAsString()
    {
        return self::exceptionToString($this->thrownException);
    }

Usage Example

 /**
  * @param \PHPUnit_Framework_TestFailure $defect
  */
 protected function printDefectTrace(\PHPUnit_Framework_TestFailure $defect)
 {
     $this->write($defect->getExceptionAsString());
     $this->writeResults($defect->getExceptionAsString());
     $trace = \PHPUnit_Util_Filter::getFilteredStacktrace($defect->thrownException());
     if (!empty($trace)) {
         $this->write("\n" . $trace);
         $this->writeResults("\n" . $trace);
     }
     $e = $defect->thrownException()->getPrevious();
     while ($e) {
         $buffer = "\nCaused by\n" . \PHPUnit_Framework_TestFailure::exceptionToString($e) . "\n" . \PHPUnit_Util_Filter::getFilteredStacktrace($e);
         $this->write($buffer);
         $this->writeResults($buffer);
         $e = $e->getPrevious();
     }
 }
All Usage Examples Of PHPUnit_Framework_TestFailure::getExceptionAsString