Skip to content

Commit

Permalink
Closes #2460
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianbergmann committed Feb 4, 2017
1 parent 574ba76 commit 1044b8e
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 16 deletions.
1 change: 1 addition & 0 deletions ChangeLog-6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 1 addition & 2 deletions src/Framework/Constraint/Callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Exception;
use PHPUnit\Util\InvalidArgumentHelper;

/**
Expand All @@ -22,7 +21,7 @@ class Callback extends Constraint
/**
* @param callable $callback
*
* @throws Exception
* @throws \PHPUnit\Framework\Exception
*/
public function __construct($callback)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Exception;
use PHPUnit\Util\RegularExpression;

/**
Expand All @@ -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
*/
Expand All @@ -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}'"
);
}
Expand Down
3 changes: 1 addition & 2 deletions src/Framework/Constraint/IsEqual.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Exception;
use PHPUnit\Framework\ExpectationFailedException;
use PHPUnit\Util\InvalidArgumentHelper;
use SebastianBergmann;
Expand Down Expand Up @@ -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)
{
Expand Down
6 changes: 2 additions & 4 deletions src/Framework/Constraint/IsType.php
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.',
Expand Down
5 changes: 2 additions & 3 deletions src/Framework/Constraint/LogicalAnd.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Exception;
use PHPUnit\Framework\ExpectationFailedException;

/**
Expand All @@ -30,15 +29,15 @@ class LogicalAnd extends Constraint
/**
* @param Constraint[] $constraints
*
* @throws Exception
* @throws \PHPUnit\Framework\Exception
*/
public function setConstraints(array $constraints)
{
$this->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.'
);
Expand Down
3 changes: 1 addition & 2 deletions src/Framework/Constraint/TraversableContains.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
*/
namespace PHPUnit\Framework\Constraint;

use PHPUnit\Framework\Exception;
use PHPUnit\Util\InvalidArgumentHelper;
use SplObjectStorage;

Expand Down Expand Up @@ -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)
{
Expand Down

0 comments on commit 1044b8e

Please sign in to comment.