mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
add missing testcase
This commit is contained in:
parent
51753bc08c
commit
080b0f27e9
1 changed files with 20 additions and 0 deletions
|
@ -2374,6 +2374,26 @@ class JsonManipulatorTest extends TestCase
|
|||
"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());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue