1- <?php //[STAMP] 7e6c6e8dff53d5c6d3b146271eb7b854
1+ <?php //[STAMP] 1c0e31bd853b62bc2c914e187b574323
22namespace _generated ;
33
44// This class was automatically generated by build task
@@ -13,41 +13,6 @@ trait UnitTesterActions
1313 abstract protected function getScenario ();
1414
1515
16- /**
17- * [!] Method is generated. Documentation taken from corresponding module.
18- *
19- * Handles and checks exception called inside callback function.
20- * Either exception class name or exception instance should be provided.
21- *
22- * ```php
23- * <?php
24- * $I->expectException(MyException::class, function() {
25- * $this->doSomethingBad();
26- * });
27- *
28- * $I->expectException(new MyException(), function() {
29- * $this->doSomethingBad();
30- * });
31- * ```
32- * If you want to check message or exception code, you can pass them with exception instance:
33- * ```php
34- * <?php
35- * // will check that exception MyException is thrown with "Don't do bad things" message
36- * $I->expectException(new MyException("Don't do bad things"), function() {
37- * $this->doSomethingBad();
38- * });
39- * ```
40- *
41- * @deprecated Use expectThrowable() instead
42- * @param \Exception|string $exception
43- * @param callable $callback
44- * @see \Codeception\Module\Asserts::expectException()
45- */
46- public function expectException ($ exception , $ callback ) {
47- return $ this ->getScenario ()->runStep (new \Codeception \Step \Action ('expectException ' , func_get_args ()));
48- }
49-
50-
5116 /**
5217 * [!] Method is generated. Documentation taken from corresponding module.
5318 *
@@ -73,12 +38,11 @@ public function expectException($exception, $callback) {
7338 * });
7439 * ```
7540 *
76- * @param \Throwable|string $throwable
77- * @param callable $callback
41+ * @param Throwable|string $throwable
7842 * @see \Codeception\Module\Asserts::expectThrowable()
7943 */
80- public function expectThrowable ($ throwable , $ callback ) {
81- return $ this ->getScenario ()->runStep (new \Codeception \Step \Action ('expectThrowable ' , func_get_args ()));
44+ public function expectThrowable ($ throwable , callable $ callback ): void {
45+ $ this ->getScenario ()->runStep (new \Codeception \Step \Action ('expectThrowable ' , func_get_args ()));
8246 }
8347
8448
0 commit comments