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
4949 require $ this ->fixturesFolder . '/Encryption.php ' ;
5050 }
5151
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 ();
5463 }
5564
5665 public function testBasicValues (): void
@@ -284,9 +293,6 @@ public function testDiscoveryNotEnabledWillNotPopulateRegistrarsArray(): void
284293 $ config = new RegistrarConfig ();
285294
286295 $ this ->assertSame ([], $ config ::$ registrars );
287-
288- // Reset Modules Config.
289- RegistrarConfig::setModules (new Modules ());
290296 }
291297
292298 /**
@@ -304,8 +310,5 @@ public function testRedoingDiscoveryWillStillSetDidDiscoveryPropertyToTrue(): vo
304310 $ config = new RegistrarConfig ();
305311
306312 $ this ->assertTrue ($ this ->getPrivateProperty ($ config , 'didDiscovery ' ));
307-
308- // Reset locator.
309- $ this ->resetServices ();
310313 }
311314}
You can’t perform that action at this time.
0 commit comments