File tree Expand file tree Collapse file tree 3 files changed +12
-5
lines changed
tests/end-to-end/regression Expand file tree Collapse file tree 3 files changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -7,7 +7,11 @@ $_SERVER['argv'][] = '--no-configuration';
7
7
$ _SERVER ['argv ' ][] = '--process-isolation ' ;
8
8
$ _SERVER ['argv ' ][] = __DIR__ . '/5592/Issue5592TestIsolation.php ' ;
9
9
10
- set_exception_handler (static fn () => null );
10
+ function global5592IsolationExceptionHandler (Throwable $ exception ): void
11
+ {
12
+ }
13
+
14
+ set_exception_handler ('global5592IsolationExceptionHandler ' );
11
15
12
16
require_once __DIR__ . '/../../bootstrap.php ' ;
13
17
(new PHPUnit \TextUI \Application )->run ($ _SERVER ['argv ' ]);
Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ $_SERVER['argv'][] = '--do-not-cache-result';
6
6
$ _SERVER ['argv ' ][] = '--no-configuration ' ;
7
7
$ _SERVER ['argv ' ][] = __DIR__ . '/5592/Issue5592Test.php ' ;
8
8
9
- set_exception_handler (static fn () => null );
9
+ function global5592ExceptionHandler (Throwable $ exception ): void
10
+ {
11
+ }
12
+
13
+ set_exception_handler ('global5592ExceptionHandler ' );
10
14
11
15
require_once __DIR__ . '/../../bootstrap.php ' ;
12
16
(new PHPUnit \TextUI \Application )->run ($ _SERVER ['argv ' ]);
Original file line number Diff line number Diff line change 13
13
use function restore_exception_handler ;
14
14
use function set_error_handler ;
15
15
use function set_exception_handler ;
16
- use Closure ;
17
16
use PHPUnit \Framework \TestCase ;
18
17
use PHPUnit \Runner \ErrorHandler ;
19
18
use Throwable ;
@@ -48,15 +47,15 @@ public function testAddedAndRemovedExceptionHandler(): void
48
47
$ previous = set_exception_handler ([$ this , 'addedAndRemovedExceptionHandler ' ]);
49
48
restore_exception_handler ();
50
49
51
- $ this ->assertInstanceOf (Closure::class , $ previous );
50
+ $ this ->assertSame ( ' global5592ExceptionHandler ' , $ previous );
52
51
$ this ->assertTrue (true );
53
52
}
54
53
55
54
public function testAddedExceptionHandler (): void
56
55
{
57
56
$ previous = set_exception_handler ([$ this , 'addedExceptionHandler ' ]);
58
57
59
- $ this ->assertInstanceOf (Closure::class , $ previous );
58
+ $ this ->assertSame ( ' global5592ExceptionHandler ' , $ previous );
60
59
$ this ->assertTrue (false );
61
60
}
62
61
You can’t perform that action at this time.
0 commit comments