Fix tests on windows, fixes #3141
parent
1c051d9c8e
commit
472c8a5113
|
@ -115,7 +115,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
||||||
$config->merge(array('config' => array('a' => 'b', 'c' => '{$a}')));
|
$config->merge(array('config' => array('a' => 'b', 'c' => '{$a}')));
|
||||||
$config->merge(array('config' => array('bin-dir' => '$HOME', 'cache-dir' => '~/foo/')));
|
$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('b', $config->get('c'));
|
||||||
$this->assertEquals($home.'/', $config->get('bin-dir'));
|
$this->assertEquals($home.'/', $config->get('bin-dir'));
|
||||||
$this->assertEquals($home.'/foo', $config->get('cache-dir'));
|
$this->assertEquals($home.'/foo', $config->get('cache-dir'));
|
||||||
|
|
Loading…
Reference in New Issue