1
0
Fork 0

Update config tests to not use environment variables

pull/3448/head
Chris Smith 2014-11-21 10:15:17 +00:00
parent 86b5938cdb
commit c819bd7e70
1 changed files with 4 additions and 4 deletions

View File

@ -21,7 +21,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
*/ */
public function testAddPackagistRepository($expected, $localConfig, $systemConfig = null) public function testAddPackagistRepository($expected, $localConfig, $systemConfig = null)
{ {
$config = new Config(); $config = new Config(false);
if ($systemConfig) { if ($systemConfig) {
$config->merge(array('repositories' => $systemConfig)); $config->merge(array('repositories' => $systemConfig));
} }
@ -102,7 +102,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
public function testMergeGithubOauth() public function testMergeGithubOauth()
{ {
$config = new Config(); $config = new Config(false);
$config->merge(array('config' => array('github-oauth' => array('foo' => 'bar')))); $config->merge(array('config' => array('github-oauth' => array('foo' => 'bar'))));
$config->merge(array('config' => array('github-oauth' => array('bar' => 'baz')))); $config->merge(array('config' => array('github-oauth' => array('bar' => 'baz'))));
@ -111,7 +111,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
public function testVarReplacement() public function testVarReplacement()
{ {
$config = new Config(); $config = new Config(false);
$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/')));
@ -123,7 +123,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
public function testOverrideGithubProtocols() public function testOverrideGithubProtocols()
{ {
$config = new Config(); $config = new Config(false);
$config->merge(array('config' => array('github-protocols' => array('https', 'git')))); $config->merge(array('config' => array('github-protocols' => array('https', 'git'))));
$config->merge(array('config' => array('github-protocols' => array('https')))); $config->merge(array('config' => array('github-protocols' => array('https'))));