1
0
Fork 0

Add failing test for #5771

pull/5779/head
Jordi Boggiano 2016-10-10 18:02:00 +02:00
parent 823a673b12
commit 092dec9596
1 changed files with 41 additions and 0 deletions

View File

@ -1691,6 +1691,47 @@ class JsonManipulatorTest extends \PHPUnit_Framework_TestCase
', $manipulator->getContents()); ', $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() public function testAddRepositoryCanInitializeEmptyRepositories()
{ {
$manipulator = new JsonManipulator('{ $manipulator = new JsonManipulator('{