1
0
Fork 0

Revert "Backup/restore Composer environment variables"

This reverts commit 725a4fd638.
pull/3448/head
Chris Smith 2014-11-21 10:09:21 +00:00
parent 725a4fd638
commit 5a56ebd545
1 changed files with 0 additions and 33 deletions

View File

@ -16,39 +16,6 @@ use Composer\Config;
class ConfigTest extends \PHPUnit_Framework_TestCase class ConfigTest extends \PHPUnit_Framework_TestCase
{ {
private static $envVars = array(
'VENDOR_DIR',
'BIN_DIR',
'PROCESS_TIMEOUT',
'CACHE_DIR',
'CACHE_FILES_DIR',
'CACHE_REPO_DIR',
'CACHE_VCS_DIR',
'DISCARD_CHANGES',
);
private $envVarValues = array();
public function setUp()
{
foreach (self::$envVars as $var) {
$var = 'COMPOSER_' . $var;
if ($value = getenv($var)) {
$this->envVarValues[$var] = $value;
putenv($var . '=');
}
}
}
public function tearDown()
{
foreach ($this->envVarValues as $var => $value) {
putenv(sprintf('%s=%s', $var, $value));
}
}
/** /**
* @dataProvider dataAddPackagistRepository * @dataProvider dataAddPackagistRepository
*/ */