Fix tests
parent
eb40287691
commit
adee0ff132
|
@ -35,12 +35,19 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
|||
$data = array();
|
||||
$data['local config inherits system defaults'] = array(
|
||||
array(
|
||||
'packagist' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
|
||||
'packagist.org' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
|
||||
),
|
||||
array(),
|
||||
);
|
||||
|
||||
$data['local config can disable system config by name'] = array(
|
||||
array(),
|
||||
array(
|
||||
array('packagist.org' => false),
|
||||
),
|
||||
);
|
||||
|
||||
$data['local config can disable system config by name bc'] = array(
|
||||
array(),
|
||||
array(
|
||||
array('packagist' => false),
|
||||
|
@ -51,7 +58,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
|||
array(
|
||||
1 => array('type' => 'vcs', 'url' => 'git://github.com/composer/composer.git'),
|
||||
0 => array('type' => 'pear', 'url' => 'http://pear.composer.org'),
|
||||
'packagist' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
|
||||
'packagist.org' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
|
||||
),
|
||||
array(
|
||||
array('type' => 'vcs', 'url' => 'git://github.com/composer/composer.git'),
|
||||
|
@ -62,7 +69,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
|||
$data['system config adds above core defaults'] = array(
|
||||
array(
|
||||
'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
|
||||
'packagist' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
|
||||
'packagist.org' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
|
||||
),
|
||||
array(),
|
||||
array(
|
||||
|
@ -76,7 +83,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
|||
'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
|
||||
),
|
||||
array(
|
||||
array('packagist' => false),
|
||||
array('packagist.org' => false),
|
||||
array('type' => 'composer', 'url' => 'http://packagist.org'),
|
||||
),
|
||||
array(
|
||||
|
@ -86,11 +93,11 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$data['local config can override by name to bring a repo above system config'] = array(
|
||||
array(
|
||||
'packagist' => array('type' => 'composer', 'url' => 'http://packagistnew.org'),
|
||||
'packagist.org' => array('type' => 'composer', 'url' => 'http://packagistnew.org'),
|
||||
'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
|
||||
),
|
||||
array(
|
||||
'packagist' => array('type' => 'composer', 'url' => 'http://packagistnew.org'),
|
||||
'packagist.org' => array('type' => 'composer', 'url' => 'http://packagistnew.org'),
|
||||
),
|
||||
array(
|
||||
'example.com' => array('type' => 'composer', 'url' => 'http://example.com'),
|
||||
|
@ -99,7 +106,7 @@ class ConfigTest extends \PHPUnit_Framework_TestCase
|
|||
|
||||
$data['incorrect local config does not cause ErrorException'] = array(
|
||||
array(
|
||||
'packagist' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
|
||||
'packagist.org' => array('type' => 'composer', 'url' => 'https?://packagist.org', 'allow_ssl_downgrade' => true),
|
||||
'type' => 'vcs',
|
||||
'url' => 'http://example.com',
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue