File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,9 +24,11 @@ abstract class TestCase extends BaseTestCase
2424
2525 public static function setUpBeforeClass (): void
2626 {
27- if (TestSuiteSubscriber::getCurrentSuite () === 'feature ' ) {
27+ $ currentSuite = TestSuiteSubscriber::getCurrentSuite ();
28+
29+ if ($ currentSuite === 'feature ' ) {
2830 Dotenv::createImmutable (__DIR__ , '.env.feature ' )->safeLoad ();
29- } elseif (TestSuiteSubscriber:: getCurrentSuite () === 'unit ' ) {
31+ } elseif ($ currentSuite === 'unit ' ) {
3032 Dotenv::createImmutable (__DIR__ , '.env.unit ' )->safeLoad ();
3133 }
3234
@@ -37,6 +39,11 @@ public static function setUpBeforeClass(): void
3739 }
3840
3941 self ::flushRedis ();
42+
43+ if ($ currentSuite !== 'feature ' ) {
44+ return ;
45+ }
46+
4047 // The first feature test's migrate:fresh runs before setUp() can write
4148 // the Cache facade throttle keys, so prime Redis directly before the
4249 // background queue workers start polling.
You can’t perform that action at this time.
0 commit comments