We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73c00bf commit 053e296Copy full SHA for 053e296
tests/src/integration/_utils.php
@@ -7,7 +7,8 @@ function assert_exception_thrown(callable $callback): void
7
{
8
try {
9
call_user_func($callback);
10
- exit(1);
11
} catch (\Throwable $th) {
+ return;
12
}
13
+ throw new Exception("Excption was not thrown", 255);
14
tests/src/integration/closure.php
@@ -6,7 +6,7 @@
6
assert(test_closure()('works') === 'works');
// Closure once
-// $closure = test_closure_once('test');
+$closure = test_closure_once('test');
-// assert($closure() === 'test');
-// assert_exception_thrown(fn () => $closure());
+assert(call_user_func($closure) === 'test');
+assert_exception_thrown($closure);
0 commit comments