From 33644045f4cbceb9bb49583426747e089dbfead1 Mon Sep 17 00:00:00 2001 From: edwinkortman Date: Mon, 31 Aug 2020 08:54:54 +0200 Subject: [PATCH] Remove use of namespace, keep it inline --- src/Codeception/Module/Asserts.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/src/Codeception/Module/Asserts.php b/src/Codeception/Module/Asserts.php index 3acd1d9..901b132 100644 --- a/src/Codeception/Module/Asserts.php +++ b/src/Codeception/Module/Asserts.php @@ -3,8 +3,6 @@ namespace Codeception\Module; use Codeception\Lib\Notification; -use Exception; -use Throwable; /** * Special module for using asserts in your tests. @@ -35,7 +33,7 @@ class Asserts extends AbstractAsserts * ``` * * @deprecated Use expectThrowable() instead - * @param Exception|string $exception + * @param \Exception|string $exception * @param callable $callback */ public function expectException($exception, $callback) @@ -67,7 +65,7 @@ public function expectException($exception, $callback) * }); * ``` * - * @param Throwable|string $throwable + * @param \Throwable|string $throwable * @param callable $callback */ public function expectThrowable($throwable, $callback) @@ -84,10 +82,10 @@ public function expectThrowable($throwable, $callback) try { $callback(); - } catch (Exception $t) { + } catch (\Exception $t) { $this->checkThrowable($t, $class, $msg, $code); return; - } catch (Throwable $t) { + } catch (\Throwable $t) { $this->checkThrowable($t, $class, $msg, $code); return; } @@ -99,7 +97,7 @@ public function expectThrowable($throwable, $callback) * Check if the given throwable matches the expected data, * fail (throws an exception) if it does not. * - * @param Throwable $throwable + * @param \Throwable $throwable * @param string $expectedClass * @param string $expectedMsg * @param int $expectedCode