diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 5c44c780..413f166a 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -4,8 +4,9 @@ + convertDeprecationsToExceptions="true"> ./tests/ @@ -19,4 +20,7 @@ ./src/functions_include.php + + + diff --git a/tests/Internal/RejectedPromiseTest.php b/tests/Internal/RejectedPromiseTest.php index 028ca4dc..e2e7a15f 100644 --- a/tests/Internal/RejectedPromiseTest.php +++ b/tests/Internal/RejectedPromiseTest.php @@ -29,15 +29,15 @@ public function getPromiseTestAdapter(callable $canceller = null) 'resolve' => function () { throw new LogicException('You cannot call resolve() for React\Promise\RejectedPromise'); }, - 'reject' => function ($reason = null) use (&$promise) { + 'reject' => function (\Throwable $reason) use (&$promise) { if (!$promise) { $promise = new RejectedPromise($reason); } }, - 'settle' => function ($reason = "") use (&$promise) { + 'settle' => function ($reason = '') use (&$promise) { if (!$promise) { if (!$reason instanceof Exception) { - $reason = new Exception($reason); + $reason = new Exception((string) $reason); } $promise = new RejectedPromise($reason);