mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
[Config command] allow to pass options when adding a repo
This commit is contained in:
parent
06a21132db
commit
e727f9f5fe
4 changed files with 51 additions and 3 deletions
|
@ -52,6 +52,24 @@ class JsonConfigSourceTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertFileEquals($this->fixturePath('config/config-with-exampletld-repository.json'), $config);
|
||||
}
|
||||
|
||||
public function testAddRepositoryWithOptions()
|
||||
{
|
||||
$config = $this->workingDir.'/composer.json';
|
||||
copy($this->fixturePath('composer-repositories.json'), $config);
|
||||
$jsonConfigSource = new JsonConfigSource(new JsonFile($config));
|
||||
$jsonConfigSource->addRepository('example_tld', array(
|
||||
'type' => 'composer',
|
||||
'url' => 'https://example.tld',
|
||||
'options' => array(
|
||||
'ssl' => array(
|
||||
'local_cert' => '/home/composer/.ssl/composer.pem'
|
||||
)
|
||||
)
|
||||
));
|
||||
|
||||
$this->assertFileEquals($this->fixturePath('config/config-with-exampletld-repository-and-options.json'), $config);
|
||||
}
|
||||
|
||||
public function testRemoveRepository()
|
||||
{
|
||||
$config = $this->workingDir.'/composer.json';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue