Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: sebastianbergmann/phpunit
...
head fork: sebastianbergmann/phpunit
  • 2 commits
  • 4 files changed
  • 0 commit comments
  • 2 contributors
15 PHPUnit/Framework/Error.php
View
@@ -60,18 +60,17 @@ class PHPUnit_Framework_Error extends Exception
/**
* Constructor.
*
- * @param string $message
- * @param integer $code
- * @param string $file
- * @param integer $line
- * @param array $trace
+ * @param string $message
+ * @param integer $code
+ * @param string $file
+ * @param integer $line
+ * @param Exception $previous
*/
- public function __construct($message, $code, $file, $line, $trace)
+ public function __construct($message, $code, $file, $line, Exception $previous = NULL)
{
- parent::__construct($message, $code);
+ parent::__construct($message, $code, $previous);
$this->file = $file;
$this->line = $line;
- $this->trace = $trace;
}
}
4 PHPUnit/Framework/ExpectationFailedException.php
View
@@ -66,11 +66,11 @@ class PHPUnit_Framework_ExpectationFailedException extends PHPUnit_Framework_Ass
*/
protected $comparisonFailure;
- public function __construct($message, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL)
+ public function __construct($message, PHPUnit_Framework_ComparisonFailure $comparisonFailure = NULL, Exception $previous = NULL)
{
$this->comparisonFailure = $comparisonFailure;
- parent::__construct($message);
+ parent::__construct($message, 0, $previous);
}
/**
2  PHPUnit/Util/ErrorHandler.php
View
@@ -128,6 +128,6 @@ public static function handleError($errno, $errstr, $errfile, $errline)
$exception = 'PHPUnit_Framework_Error';
}
- throw new $exception($errstr, $errno, $errfile, $errline, $trace);
+ throw new $exception($errstr, $errno, $errfile, $errline);
}
}
6 PHPUnit/Util/Filter.php
View
@@ -83,7 +83,11 @@ public static function getFilteredStacktrace(Exception $e, $asString = TRUE)
$eFile = $e->getSyntheticFile();
$eLine = $e->getSyntheticLine();
} else {
- $eTrace = $e->getTrace();
+ if ($e->getPrevious()) {
+ $eTrace = $e->getPrevious()->getTrace();
+ } else {
+ $eTrace = $e->getTrace();
+ }
$eFile = $e->getFile();
$eLine = $e->getLine();
}

No commit comments for this range

Something went wrong with that request. Please try again.