diff --git a/tests/unit/Framework/MockObject/MockObjectTest.php b/tests/unit/Framework/MockObject/MockObjectTest.php index fe916f90332..cad33c56895 100644 --- a/tests/unit/Framework/MockObject/MockObjectTest.php +++ b/tests/unit/Framework/MockObject/MockObjectTest.php @@ -947,7 +947,7 @@ public function testCreateTwoMocksOfOneWsdlFile(): void */ public function testCreateMockOfWsdlFileWithSpecialChars(): void { - $mock = $this->getMockFromWsdl(__DIR__ . '/_fixture/Go ogle-Sea.rch.wsdl'); + $mock = $this->getMockFromWsdl(TEST_FILES_PATH . 'Go ogle-Sea.rch.wsdl'); $this->assertStringStartsWith('Mock_GoogleSearch_', \get_class($mock)); } diff --git a/tests/unit/Util/ConfigurationTest.php b/tests/unit/Util/ConfigurationTest.php index 95d8652ebff..8e34e85ee55 100644 --- a/tests/unit/Util/ConfigurationTest.php +++ b/tests/unit/Util/ConfigurationTest.php @@ -428,11 +428,19 @@ public function testHandlePHPConfigurationDoesForceOverwrittenExistingEnvArrayVa */ public function testHandlePHPConfigurationDoesNotOverriteVariablesFromPutEnv(): void { + $backupFoo = \getenv('foo'); + \putenv('foo=putenv'); $this->configuration->handlePHPConfiguration(); $this->assertEquals('putenv', $_ENV['foo']); $this->assertEquals('putenv', \getenv('foo')); + + if ($backupFoo === false) { + \putenv('foo'); // delete variable from environment + } else { + \putenv("foo=$backupFoo"); + } } /**