Browse Source

Fix tests on windows, fixes #3141

Jordi Boggiano 10 years ago
parent
commit
472c8a5113
1 changed files with 1 additions and 1 deletions
  1. 1 1
      tests/Composer/Test/ConfigTest.php

+ 1 - 1
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'));