From 925b8c8e61b099565ff5e1de318fa4448e9d023b Mon Sep 17 00:00:00 2001 From: vibbow Date: Wed, 17 Apr 2019 02:37:53 +0800 Subject: [PATCH] Reset $registrars at each BaseConfig test, to prevent it get modified from other tests. --- tests/system/Config/BaseConfigTest.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/system/Config/BaseConfigTest.php b/tests/system/Config/BaseConfigTest.php index ee0616dfbc78..32b551de90de 100644 --- a/tests/system/Config/BaseConfigTest.php +++ b/tests/system/Config/BaseConfigTest.php @@ -198,8 +198,9 @@ public function testNotEnabled() $modulesConfig = config('Modules'); $modulesConfig->enabled = false; - $config = new \RegistrarConfig(); - $expected = $config::$registrars; + $config = new \RegistrarConfig(); + $config::$registrars = []; + $expected = $config::$registrars; $method = $this->getPrivateMethodInvoker($config, 'registerProperties'); $method(); @@ -212,7 +213,8 @@ public function testDidDiscovery() $modulesConfig = config('Modules'); $modulesConfig->enabled = true; - $config = new \RegistrarConfig(); + $config = new \RegistrarConfig(); + $config::$registrars = []; $this->setPrivateProperty($config, 'didDiscovery', false); $method = $this->getPrivateMethodInvoker($config, 'registerProperties');