diff --git a/tests/SPC/util/GlobalEnvManagerTest.php b/tests/SPC/util/GlobalEnvManagerTest.php index 28d60d34..1caeaa19 100644 --- a/tests/SPC/util/GlobalEnvManagerTest.php +++ b/tests/SPC/util/GlobalEnvManagerTest.php @@ -23,6 +23,10 @@ final class GlobalEnvManagerTest extends TestCase 'SPC_TARGET' => getenv('SPC_TARGET'), 'SPC_LIBC' => getenv('SPC_LIBC'), ]; + // Temporarily set private GlobalEnvManager::$initialized to false (use reflection) + $reflection = new \ReflectionClass(GlobalEnvManager::class); + $property = $reflection->getProperty('initialized'); + $property->setValue(null, false); } protected function tearDown(): void @@ -35,6 +39,10 @@ final class GlobalEnvManagerTest extends TestCase putenv("{$key}={$value}"); } } + // Temporarily set private GlobalEnvManager::$initialized to false (use reflection) + $reflection = new \ReflectionClass(GlobalEnvManager::class); + $property = $reflection->getProperty('initialized'); + $property->setValue(null, true); } public function testGetInitializedEnv(): void diff --git a/tests/SPC/util/SPCTargetTest.php b/tests/SPC/util/SPCTargetTest.php index 05d95e08..665b4045 100644 --- a/tests/SPC/util/SPCTargetTest.php +++ b/tests/SPC/util/SPCTargetTest.php @@ -34,17 +34,6 @@ final class SPCTargetTest extends TestBase } } - /** - * @dataProvider libcProvider - */ - public function testIsStatic(string $libc, bool $expected): void - { - putenv("SPC_LIBC={$libc}"); - - $result = SPCTarget::isStatic(); - $this->assertEquals($expected, $result); - } - /** * @dataProvider libcProvider */