Fix build with latest setup-php
parent
eefb4644b0
commit
3cb44bc4c0
|
@ -13,6 +13,7 @@
|
||||||
namespace Composer\Test;
|
namespace Composer\Test;
|
||||||
|
|
||||||
use Composer\Config;
|
use Composer\Config;
|
||||||
|
use Composer\Util\Platform;
|
||||||
|
|
||||||
class ConfigTest extends TestCase
|
class ConfigTest extends TestCase
|
||||||
{
|
{
|
||||||
|
@ -327,22 +328,24 @@ class ConfigTest extends TestCase
|
||||||
|
|
||||||
public function testProcessTimeout()
|
public function testProcessTimeout()
|
||||||
{
|
{
|
||||||
putenv('COMPOSER_PROCESS_TIMEOUT=0');
|
Platform::putEnv('COMPOSER_PROCESS_TIMEOUT', '0');
|
||||||
$config = new Config(true);
|
$config = new Config(true);
|
||||||
$this->assertEquals(0, $config->get('process-timeout'));
|
$this->assertEquals(0, $config->get('process-timeout'));
|
||||||
putenv('COMPOSER_PROCESS_TIMEOUT');
|
Platform::clearEnv('COMPOSER_PROCESS_TIMEOUT');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testHtaccessProtect()
|
public function testHtaccessProtect()
|
||||||
{
|
{
|
||||||
putenv('COMPOSER_HTACCESS_PROTECT=0');
|
Platform::putEnv('COMPOSER_HTACCESS_PROTECT', '0');
|
||||||
$config = new Config(true);
|
$config = new Config(true);
|
||||||
$this->assertEquals(0, $config->get('htaccess-protect'));
|
$this->assertEquals(0, $config->get('htaccess-protect'));
|
||||||
putenv('COMPOSER_HTACCESS_PROTECT');
|
Platform::clearEnv('COMPOSER_HTACCESS_PROTECT');
|
||||||
}
|
}
|
||||||
|
|
||||||
public function testGetSourceOfValue()
|
public function testGetSourceOfValue()
|
||||||
{
|
{
|
||||||
|
Platform::clearEnv('COMPOSER_PROCESS_TIMEOUT');
|
||||||
|
|
||||||
$config = new Config;
|
$config = new Config;
|
||||||
|
|
||||||
$this->assertSame(Config::SOURCE_DEFAULT, $config->getSourceOfValue('process-timeout'));
|
$this->assertSame(Config::SOURCE_DEFAULT, $config->getSourceOfValue('process-timeout'));
|
||||||
|
@ -357,9 +360,9 @@ class ConfigTest extends TestCase
|
||||||
|
|
||||||
public function testGetSourceOfValueEnvVariables()
|
public function testGetSourceOfValueEnvVariables()
|
||||||
{
|
{
|
||||||
putenv('COMPOSER_HTACCESS_PROTECT=0');
|
Platform::putEnv('COMPOSER_HTACCESS_PROTECT', '0');
|
||||||
$config = new Config;
|
$config = new Config;
|
||||||
$this->assertEquals('COMPOSER_HTACCESS_PROTECT', $config->getSourceOfValue('htaccess-protect'));
|
$this->assertEquals('COMPOSER_HTACCESS_PROTECT', $config->getSourceOfValue('htaccess-protect'));
|
||||||
putenv('COMPOSER_HTACCESS_PROTECT');
|
Platform::clearEnv('COMPOSER_HTACCESS_PROTECT');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue