Add failing test for #5771
parent
823a673b12
commit
092dec9596
|
@ -1691,6 +1691,47 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
|
|||
', $manipulator->getContents());
|
||||
}
|
||||
|
||||
public function testAddExtraWithPackage()
|
||||
{
|
||||
//$this->markTestSkipped();
|
||||
$manipulator = new JsonManipulator('{
|
||||
"repositories": [
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
"authors": [],
|
||||
"extra": {
|
||||
"package-xml": "package.xml"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"auto-append-gitignore": true
|
||||
}
|
||||
}');
|
||||
|
||||
$this->assertTrue($manipulator->addProperty('extra.foo-bar', true));
|
||||
$this->assertEquals('{
|
||||
"repositories": [
|
||||
{
|
||||
"type": "package",
|
||||
"package": {
|
||||
"authors": [],
|
||||
"extra": {
|
||||
"package-xml": "package.xml"
|
||||
}
|
||||
}
|
||||
}
|
||||
],
|
||||
"extra": {
|
||||
"auto-append-gitignore": true,
|
||||
"foo-bar": true
|
||||
}
|
||||
}
|
||||
', $manipulator->getContents());
|
||||
}
|
||||
|
||||
public function testAddRepositoryCanInitializeEmptyRepositories()
|
||||
{
|
||||
$manipulator = new JsonManipulator('{
|
||||
|
|
Loading…
Reference in New Issue