File tree Expand file tree Collapse file tree 2 files changed +8
-0
lines changed
Expand file tree Collapse file tree 2 files changed +8
-0
lines changed Original file line number Diff line number Diff line change 1111
1212namespace Zenstruck \Foundry \Test ;
1313
14+ use PHPUnit \Framework \Attributes \After ;
15+ use PHPUnit \Framework \Attributes \Before ;
1416use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
1517use Zenstruck \Foundry \ChainManagerRegistry ;
1618use Zenstruck \Foundry \Exception \FoundryBootException ;
@@ -27,6 +29,7 @@ trait Factories
2729 * @internal
2830 * @before
2931 */
32+ #[Before]
3033 public static function _setUpFactories (): void
3134 {
3235 if (!\is_subclass_of (static ::class, KernelTestCase::class)) {
@@ -57,6 +60,7 @@ public static function _setUpFactories(): void
5760 * @internal
5861 * @after
5962 */
63+ #[After]
6064 public static function _tearDownFactories (): void
6165 {
6266 try {
Original file line number Diff line number Diff line change 1212namespace Zenstruck \Foundry \Test ;
1313
1414use DAMA \DoctrineTestBundle \Doctrine \DBAL \StaticDriver ;
15+ use PHPUnit \Framework \Attributes \Before ;
16+ use PHPUnit \Framework \Attributes \BeforeClass ;
1517use Symfony \Bundle \FrameworkBundle \Test \KernelTestCase ;
1618use Symfony \Component \DependencyInjection \ContainerInterface ;
1719use Symfony \Component \HttpKernel \KernelInterface ;
@@ -28,6 +30,7 @@ trait ResetDatabase
2830 * @internal
2931 * @beforeClass
3032 */
33+ #[BeforeClass]
3134 public static function _resetDatabase (): void
3235 {
3336 if (!\is_subclass_of (static ::class, KernelTestCase::class)) {
@@ -65,6 +68,7 @@ public static function _resetDatabase(): void
6568 * @internal
6669 * @before
6770 */
71+ #[Before]
6872 public static function _resetSchema (): void
6973 {
7074 if (!\is_subclass_of (static ::class, KernelTestCase::class)) {
You can’t perform that action at this time.
0 commit comments