3
3
namespace Codeception \Module ;
4
4
5
5
use Codeception \Lib \Notification ;
6
- use Exception ;
7
- use Throwable ;
8
6
9
7
/**
10
8
* Special module for using asserts in your tests.
@@ -35,7 +33,7 @@ class Asserts extends AbstractAsserts
35
33
* ```
36
34
*
37
35
* @deprecated Use expectThrowable() instead
38
- * @param Exception|string $exception
36
+ * @param \ Exception|string $exception
39
37
* @param callable $callback
40
38
*/
41
39
public function expectException ($ exception , $ callback )
@@ -67,7 +65,7 @@ public function expectException($exception, $callback)
67
65
* });
68
66
* ```
69
67
*
70
- * @param Throwable|string $throwable
68
+ * @param \ Throwable|string $throwable
71
69
* @param callable $callback
72
70
*/
73
71
public function expectThrowable ($ throwable , $ callback )
@@ -84,10 +82,10 @@ public function expectThrowable($throwable, $callback)
84
82
85
83
try {
86
84
$ callback ();
87
- } catch (Exception $ t ) {
85
+ } catch (\ Exception $ t ) {
88
86
$ this ->checkThrowable ($ t , $ class , $ msg , $ code );
89
87
return ;
90
- } catch (Throwable $ t ) {
88
+ } catch (\ Throwable $ t ) {
91
89
$ this ->checkThrowable ($ t , $ class , $ msg , $ code );
92
90
return ;
93
91
}
@@ -99,7 +97,7 @@ public function expectThrowable($throwable, $callback)
99
97
* Check if the given throwable matches the expected data,
100
98
* fail (throws an exception) if it does not.
101
99
*
102
- * @param Throwable $throwable
100
+ * @param \ Throwable $throwable
103
101
* @param string $expectedClass
104
102
* @param string $expectedMsg
105
103
* @param int $expectedCode
0 commit comments