Skip to content

Remove use of namespace, keep it inline #9

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 5 additions & 7 deletions src/Codeception/Module/Asserts.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
namespace Codeception\Module;

use Codeception\Lib\Notification;
use Exception;
use Throwable;

/**
* Special module for using asserts in your tests.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand All @@ -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;
}
Expand All @@ -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
Expand Down