File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change 22
33namespace PHPStan \Testing ;
44
5- use Override ;
65use PHPStan \Analyser \ConstantResolver ;
76use PHPStan \Analyser \DirectInternalScopeFactory ;
87use PHPStan \Analyser \Error ;
@@ -97,12 +96,6 @@ public static function getContainer(): Container
9796 return self ::$ containers [$ cacheKey ];
9897 }
9998
100- #[Override]
101- public static function setUpBeforeClass (): void
102- {
103- self ::getContainer ();
104- }
105-
10699 /**
107100 * @return string[]
108101 */
Original file line number Diff line number Diff line change @@ -30,7 +30,13 @@ class InitContainerBeforeDataProvider implements DataProviderMethodCalledSubscri
3030
3131 public function notify (DataProviderMethodCalled $ event ): void
3232 {
33- PHPStanTestCase::getContainer ();
33+ $ testClassName = $ event ->testMethod ()->className ();
34+
35+ if (!is_a ($ testClassName , PhpStanTestCase::class, true )) {
36+ return ;
37+ }
38+
39+ $ testClassName ::getContainer ();
3440 }
3541
3642}
You can’t perform that action at this time.
0 commit comments