From 62fe2ed680862b59c71d01943cb78a64981f4c0c Mon Sep 17 00:00:00 2001 From: ping-yee <611077101@mail.nknu.edu.tw> Date: Thu, 26 Oct 2023 15:07:11 +0800 Subject: [PATCH 1/2] test: add the tearDown to reset the mock service after run `testRedoingDiscoveryWillStillSetDidDiscoveryPropertyToTrue()` test. --- tests/system/Config/BaseConfigTest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/system/Config/BaseConfigTest.php b/tests/system/Config/BaseConfigTest.php index 958387cc6b6d..25c3bd0d5f22 100644 --- a/tests/system/Config/BaseConfigTest.php +++ b/tests/system/Config/BaseConfigTest.php @@ -53,6 +53,11 @@ protected function setUp(): void BaseConfig::setModules(new Modules()); // reset to clean copy of Modules } + protected function tearDown(): void + { + $this->resetServices(); + } + public function testBasicValues(): void { $dotenv = new DotEnv($this->fixturesFolder, '.env'); From 53c94a2f39f8aeeb751d116c9dcf4a7772cfea7c Mon Sep 17 00:00:00 2001 From: ping-yee <611077101@mail.nknu.edu.tw> Date: Thu, 26 Oct 2023 15:12:59 +0800 Subject: [PATCH 2/2] test: add the tearDown(). --- tests/system/Config/BaseConfigTest.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/system/Config/BaseConfigTest.php b/tests/system/Config/BaseConfigTest.php index 25c3bd0d5f22..96cfcd8dc0e5 100644 --- a/tests/system/Config/BaseConfigTest.php +++ b/tests/system/Config/BaseConfigTest.php @@ -55,6 +55,8 @@ protected function setUp(): void protected function tearDown(): void { + parent::tearDown(); + $this->resetServices(); }