diff --git a/tests/Composer/Test/ConfigTest.php b/tests/Composer/Test/ConfigTest.php index 5afbabffa..705fe78e0 100644 --- a/tests/Composer/Test/ConfigTest.php +++ b/tests/Composer/Test/ConfigTest.php @@ -115,7 +115,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase $config->merge(array('config' => array('a' => 'b', 'c' => '{$a}'))); $config->merge(array('config' => array('bin-dir' => '$HOME', 'cache-dir' => '~/foo/'))); - $home = rtrim(getenv('HOME'), '\\/'); + $home = rtrim(getenv('HOME') ?: getenv('USERPROFILE'), '\\/'); $this->assertEquals('b', $config->get('c')); $this->assertEquals($home.'/', $config->get('bin-dir')); $this->assertEquals($home.'/foo', $config->get('cache-dir'));