From 66983173426033616bf58d9fface0109471b5e3d Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Tue, 15 Feb 2022 16:42:50 +0100 Subject: [PATCH] Make tests more robust --- tests/Composer/Test/ConfigTest.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/tests/Composer/Test/ConfigTest.php b/tests/Composer/Test/ConfigTest.php index fdf2587a3..d9d5c8cb2 100644 --- a/tests/Composer/Test/ConfigTest.php +++ b/tests/Composer/Test/ConfigTest.php @@ -330,16 +330,20 @@ class ConfigTest extends TestCase { Platform::putEnv('COMPOSER_PROCESS_TIMEOUT', '0'); $config = new Config(true); - $this->assertEquals(0, $config->get('process-timeout')); + $result = $config->get('process-timeout'); Platform::clearEnv('COMPOSER_PROCESS_TIMEOUT'); + + $this->assertEquals(0, $result); } public function testHtaccessProtect() { Platform::putEnv('COMPOSER_HTACCESS_PROTECT', '0'); $config = new Config(true); - $this->assertEquals(0, $config->get('htaccess-protect')); + $result = $config->get('htaccess-protect'); Platform::clearEnv('COMPOSER_HTACCESS_PROTECT'); + + $this->assertEquals(0, $result); } public function testGetSourceOfValue() @@ -362,7 +366,9 @@ class ConfigTest extends TestCase { Platform::putEnv('COMPOSER_HTACCESS_PROTECT', '0'); $config = new Config; - $this->assertEquals('COMPOSER_HTACCESS_PROTECT', $config->getSourceOfValue('htaccess-protect')); + $result = $config->getSourceOfValue('htaccess-protect'); Platform::clearEnv('COMPOSER_HTACCESS_PROTECT'); + + $this->assertEquals('COMPOSER_HTACCESS_PROTECT', $result); } }