1
0
Fork 0

add missing testcase

pull/8134/head
Rob Bast 2019-05-08 15:58:02 +02:00
parent 51753bc08c
commit 080b0f27e9
1 changed files with 20 additions and 0 deletions

View File

@ -2374,6 +2374,26 @@ class JsonManipulatorTest extends TestCase
"package/a": "*" "package/a": "*"
} }
} }
', $manipulator->getContents());
}
public function testEscapedUnicodeDoesNotCauseBacktrackLimitErrorGithubIssue8131()
{
$manipulator = new JsonManipulator('{
"description": "Some U\u00F1icode",
"require": {
"foo/bar": "^1.0"
}
}');
$this->assertTrue($manipulator->addLink('require', 'foo/baz', '^1.0'));
$this->assertEquals('{
"description": "Some U\u00F1icode",
"require": {
"foo/bar": "^1.0",
"foo/baz": "^1.0"
}
}
', $manipulator->getContents()); ', $manipulator->getContents());
} }
} }