File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 11
11
12
12
namespace Symfony \Bundle \FrameworkBundle \Test ;
13
13
14
- use PHPUnit \Framework \Attributes \AfterClass ;
15
14
use PHPUnit \Framework \TestCase ;
16
15
use Symfony \Component \DependencyInjection \Container ;
17
16
use Symfony \Component \DependencyInjection \Exception \ServiceNotFoundException ;
@@ -40,6 +39,14 @@ protected function tearDown(): void
40
39
static ::$ booted = false ;
41
40
}
42
41
42
+ public static function tearDownAfterClass (): void
43
+ {
44
+ static ::ensureKernelShutdown ();
45
+ static ::$ class = null ;
46
+ static ::$ kernel = null ;
47
+ static ::$ booted = false ;
48
+ }
49
+
43
50
/**
44
51
* @throws \RuntimeException
45
52
* @throws \LogicException
@@ -113,11 +120,8 @@ protected static function createKernel(array $options = []): KernelInterface
113
120
114
121
/**
115
122
* Shuts the kernel down if it was used in the test - called by the tearDown method by default.
116
- *
117
- * @afterClass
118
123
*/
119
- #[AfterClass]
120
- public static function ensureKernelShutdown ()
124
+ protected static function ensureKernelShutdown ()
121
125
{
122
126
if (null !== static ::$ kernel ) {
123
127
static ::$ kernel ->boot ();
You can’t perform that action at this time.
0 commit comments