Skip to content

Commit 053e296

Browse files
tests: enable closures again
1 parent 73c00bf commit 053e296

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

tests/src/integration/_utils.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ function assert_exception_thrown(callable $callback): void
77
{
88
try {
99
call_user_func($callback);
10-
exit(1);
1110
} catch (\Throwable $th) {
11+
return;
1212
}
13+
throw new Exception("Excption was not thrown", 255);
1314
}

tests/src/integration/closure.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
assert(test_closure()('works') === 'works');
77

88
// Closure once
9-
// $closure = test_closure_once('test');
9+
$closure = test_closure_once('test');
1010

11-
// assert($closure() === 'test');
12-
// assert_exception_thrown(fn () => $closure());
11+
assert(call_user_func($closure) === 'test');
12+
assert_exception_thrown($closure);

0 commit comments

Comments
 (0)