Skip to content

Commit a467f50

Browse files
committed
chore: replace tearDownAfterClass in favour of @afterclass
1 parent feeac45 commit a467f50

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

src/Symfony/Bundle/FrameworkBundle/Test/KernelTestCase.php

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,6 @@ protected function tearDown(): void
3939
static::$booted = false;
4040
}
4141

42-
public static function tearDownAfterClass(): void
43-
{
44-
static::ensureKernelShutdown();
45-
parent::tearDownAfterClass();
46-
}
47-
4842
/**
4943
* @throws \RuntimeException
5044
* @throws \LogicException
@@ -138,4 +132,14 @@ protected static function ensureKernelShutdown()
138132
}
139133
}
140134
}
135+
136+
/**
137+
* Ensures the Kernel is shut down after all tests in the class have run.
138+
*
139+
* @afterClass
140+
*/
141+
public static function ensureKernelShutdownAfterClass(): void
142+
{
143+
static::ensureKernelShutdown();
144+
}
141145
}

0 commit comments

Comments
 (0)