mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Merge remote-tracking branch 'adrianosferreira/package-install-method-cli'
Fixed formatting, and handling of config command to be preferred-install.foo value Refs #8517
This commit is contained in:
commit
ee3fd0f745
2 changed files with 72 additions and 0 deletions
|
@ -1814,6 +1814,51 @@ class JsonManipulatorTest extends TestCase
|
|||
', $manipulator->getContents());
|
||||
}
|
||||
|
||||
public function testAddConfigWithPackage() {
|
||||
$manipulator = new JsonManipulator('{
|
||||
"repositories": [
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
"authors": [],
|
||||
"extra": {
|
||||
"package-xml": "package.xml"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.3.9"
|
||||
}
|
||||
}
|
||||
}');
|
||||
|
||||
$this->assertTrue($manipulator->addConfigSetting('preferred-install.my-organization/stable-package', 'dist'));
|
||||
$this->assertEquals('{
|
||||
"repositories": [
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
"authors": [],
|
||||
"extra": {
|
||||
"package-xml": "package.xml"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"config": {
|
||||
"platform": {
|
||||
"php": "5.3.9"
|
||||
},
|
||||
"preferred-install": {
|
||||
"my-organization/stable-package": "dist"
|
||||
}
|
||||
}
|
||||
}
|
||||
', $manipulator->getContents());
|
||||
}
|
||||
|
||||
public function testAddSuggestWithPackage()
|
||||
{
|
||||
$manipulator = new JsonManipulator('{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue