/** * Gets a message for an example with exceptions * * @param integer $increment * @param \Exception $exception * @param \PHPSpec\Specification\Example $example * @param boolean $backtrace * @return string */ protected function getMessageForExceptions($increment, $exception, $example, $backtrace) { $trace = $backtrace ? null : 3; return <<<MESSAGE {$increment}) {$example->getDescription()} {$this->red('Failure\\Exception: ' . $exception->getSnippet(1))} {$this->red($exception->getExceptionClass() . ': ' . $exception->getMessage())} {$this->grey($exception->prettyTrace($trace))} MESSAGE; }