Exemple #1
0
 /**
  * Gets a pretty trace (rspec format)
  * 
  * @param integer $limit
  * @return string
  */
 public function prettyTrace($limit = 3)
 {
     return Backtrace::pretty($this->getTrace(), $limit);
 }
Exemple #2
0
 /**
  * Adds an exception to the formatters
  * 
  * @param \PHPSpec\Specification\Example      $example
  * @param \Exception                          $e
  */
 public function addException(Example $example, \Exception $e)
 {
     $this->getExceptions()->attach($e, $example);
     $this->notify(new ReporterEvent('status', 'E', $example->getSpecificationText(), $e->getMessage(), Backtrace::pretty($e->getTrace()), $e));
     $this->checkFailFast();
 }