File tree Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Expand file tree Collapse file tree 1 file changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,17 @@ protected function setUp(): void
49
49
require $ this ->fixturesFolder . '/Encryption.php ' ;
50
50
}
51
51
52
- BaseConfig::$ registrars = [];
53
- BaseConfig::setModules (new Modules ()); // reset to clean copy of Modules
52
+ BaseConfig::reset ();
53
+ }
54
+
55
+ protected function tearDown (): void
56
+ {
57
+ parent ::tearDown ();
58
+
59
+ // This test modifies BaseConfig::$modules, so should reset.
60
+ BaseConfig::reset ();
61
+ // This test modifies Services locator, so should reset.
62
+ $ this ->resetServices ();
54
63
}
55
64
56
65
public function testBasicValues (): void
@@ -284,9 +293,6 @@ public function testDiscoveryNotEnabledWillNotPopulateRegistrarsArray(): void
284
293
$ config = new RegistrarConfig ();
285
294
286
295
$ this ->assertSame ([], $ config ::$ registrars );
287
-
288
- // Reset Modules Config.
289
- RegistrarConfig::setModules (new Modules ());
290
296
}
291
297
292
298
/**
@@ -304,8 +310,5 @@ public function testRedoingDiscoveryWillStillSetDidDiscoveryPropertyToTrue(): vo
304
310
$ config = new RegistrarConfig ();
305
311
306
312
$ this ->assertTrue ($ this ->getPrivateProperty ($ config , 'didDiscovery ' ));
307
-
308
- // Reset locator.
309
- $ this ->resetServices ();
310
313
}
311
314
}
You can’t perform that action at this time.
0 commit comments