File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 24
24
use PHPUnit \Runner \CodeCoverage ;
25
25
use PHPUnit \Runner \ErrorHandler ;
26
26
use PHPUnit \Runner \Exception ;
27
- use PHPUnit \Runner \ShutdownHandler ;
28
27
use PHPUnit \TextUI \Configuration \Configuration ;
29
28
use PHPUnit \TextUI \Configuration \Registry as ConfigurationRegistry ;
30
29
use SebastianBergmann \CodeCoverage \Exception as CodeCoverageException ;
@@ -84,7 +83,6 @@ public function run(TestCase $test): void
84
83
if ($ this ->shouldErrorHandlerBeUsed ($ test )) {
85
84
ErrorHandler::instance ()->enable ();
86
85
}
87
- ShutdownHandler::register ();
88
86
89
87
$ collectCodeCoverage = CodeCoverage::instance ()->isActive () &&
90
88
$ shouldCodeCoverageBeCollected ;
Original file line number Diff line number Diff line change @@ -23,6 +23,8 @@ final class ShutdownHandler
23
23
24
24
public static function setMessage (string $ message ): void
25
25
{
26
+ self ::register ();
27
+
26
28
self ::$ message = $ message ;
27
29
}
28
30
@@ -31,7 +33,7 @@ public static function resetMessage(): void
31
33
self ::$ message = '' ;
32
34
}
33
35
34
- public static function register (): void
36
+ private static function register (): void
35
37
{
36
38
if (self ::$ registered ) {
37
39
return ;
You can’t perform that action at this time.
0 commit comments