diff --git a/ChangeLog-6.0.md b/ChangeLog-6.0.md index 2997bccc6a1..01d3347312f 100644 --- a/ChangeLog-6.0.md +++ b/ChangeLog-6.0.md @@ -6,6 +6,7 @@ All notable changes of the PHPUnit 6.0 release series are documented in this fil ### Fixed +* Fixed [#2460](https://github.com/sebastianbergmann/phpunit/issues/2460): Strange error in tests after update to PHPUnit 6 * Fixed [#2467](https://github.com/sebastianbergmann/phpunit/issues/2467): Process Isolation does not work when using PHPUnit from PHAR ## [6.0.2] - 2017-02-03 diff --git a/src/Framework/Constraint/Callback.php b/src/Framework/Constraint/Callback.php index d587201e6b5..6f71ee56906 100644 --- a/src/Framework/Constraint/Callback.php +++ b/src/Framework/Constraint/Callback.php @@ -9,7 +9,6 @@ */ namespace PHPUnit\Framework\Constraint; -use PHPUnit\Framework\Exception; use PHPUnit\Util\InvalidArgumentHelper; /** @@ -22,7 +21,7 @@ class Callback extends Constraint /** * @param callable $callback * - * @throws Exception + * @throws \PHPUnit\Framework\Exception */ public function __construct($callback) { diff --git a/src/Framework/Constraint/ExceptionMessageRegularExpression.php b/src/Framework/Constraint/ExceptionMessageRegularExpression.php index 100936af7ab..f36b1bd6aea 100644 --- a/src/Framework/Constraint/ExceptionMessageRegularExpression.php +++ b/src/Framework/Constraint/ExceptionMessageRegularExpression.php @@ -9,7 +9,6 @@ */ namespace PHPUnit\Framework\Constraint; -use PHPUnit\Framework\Exception; use PHPUnit\Util\RegularExpression; /** @@ -34,7 +33,7 @@ public function __construct($expected) * Evaluates the constraint for parameter $other. Returns true if the * constraint is met, false otherwise. * - * @param Exception $other + * @param \PHPUnit\Framework\Exception $other * * @return bool */ @@ -43,7 +42,7 @@ protected function matches($other) $match = RegularExpression::safeMatch($this->expectedMessageRegExp, $other->getMessage()); if (false === $match) { - throw new Exception( + throw new \PHPUnit\Framework\Exception( "Invalid expected exception message regex given: '{$this->expectedMessageRegExp}'" ); } diff --git a/src/Framework/Constraint/IsEqual.php b/src/Framework/Constraint/IsEqual.php index 101cd4b1351..b1559f4f9c0 100644 --- a/src/Framework/Constraint/IsEqual.php +++ b/src/Framework/Constraint/IsEqual.php @@ -9,7 +9,6 @@ */ namespace PHPUnit\Framework\Constraint; -use PHPUnit\Framework\Exception; use PHPUnit\Framework\ExpectationFailedException; use PHPUnit\Util\InvalidArgumentHelper; use SebastianBergmann; @@ -62,7 +61,7 @@ class IsEqual extends Constraint * @param bool $canonicalize * @param bool $ignoreCase * - * @throws Exception + * @throws \PHPUnit\Framework\Exception */ public function __construct($value, $delta = 0.0, $maxDepth = 10, $canonicalize = false, $ignoreCase = false) { diff --git a/src/Framework/Constraint/IsType.php b/src/Framework/Constraint/IsType.php index 4ca94d3c46a..02702e94a19 100644 --- a/src/Framework/Constraint/IsType.php +++ b/src/Framework/Constraint/IsType.php @@ -9,8 +9,6 @@ */ namespace PHPUnit\Framework\Constraint; -use PHPUnit\Framework\Exception; - /** * Constraint that asserts that the value it is evaluated for is of a * specified type. @@ -60,14 +58,14 @@ class IsType extends Constraint /** * @param string $type * - * @throws Exception + * @throws \PHPUnit\Framework\Exception */ public function __construct($type) { parent::__construct(); if (!isset($this->types[$type])) { - throw new Exception( + throw new \PHPUnit\Framework\Exception( sprintf( 'Type specified for PHPUnit\Framework\Constraint\IsType <%s> ' . 'is not a valid type.', diff --git a/src/Framework/Constraint/LogicalAnd.php b/src/Framework/Constraint/LogicalAnd.php index 13e81928456..fdf836f9b57 100644 --- a/src/Framework/Constraint/LogicalAnd.php +++ b/src/Framework/Constraint/LogicalAnd.php @@ -9,7 +9,6 @@ */ namespace PHPUnit\Framework\Constraint; -use PHPUnit\Framework\Exception; use PHPUnit\Framework\ExpectationFailedException; /** @@ -30,7 +29,7 @@ class LogicalAnd extends Constraint /** * @param Constraint[] $constraints * - * @throws Exception + * @throws \PHPUnit\Framework\Exception */ public function setConstraints(array $constraints) { @@ -38,7 +37,7 @@ public function setConstraints(array $constraints) foreach ($constraints as $constraint) { if (!($constraint instanceof Constraint)) { - throw new Exception( + throw new \PHPUnit\Framework\Exception( 'All parameters to ' . __CLASS__ . ' must be a constraint object.' ); diff --git a/src/Framework/Constraint/TraversableContains.php b/src/Framework/Constraint/TraversableContains.php index e41526b66de..71765c227ee 100644 --- a/src/Framework/Constraint/TraversableContains.php +++ b/src/Framework/Constraint/TraversableContains.php @@ -9,7 +9,6 @@ */ namespace PHPUnit\Framework\Constraint; -use PHPUnit\Framework\Exception; use PHPUnit\Util\InvalidArgumentHelper; use SplObjectStorage; @@ -39,7 +38,7 @@ class TraversableContains extends Constraint * @param bool $checkForObjectIdentity * @param bool $checkForNonObjectIdentity * - * @throws Exception + * @throws \PHPUnit\Framework\Exception */ public function __construct($value, $checkForObjectIdentity = true, $checkForNonObjectIdentity = false) {