mirror of
https://github.com/composer/composer
synced 2025-05-09 00:22:53 +00:00
Fix 5.4.0 interop in formatting of empty array/objects
This commit is contained in:
parent
58276d0a52
commit
a30e6109bf
2 changed files with 15 additions and 1 deletions
|
@ -128,6 +128,20 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase
|
|||
$this->assertJsonFormat($json, $data);
|
||||
}
|
||||
|
||||
public function testFormatEmptyArray()
|
||||
{
|
||||
$data = array('test' => array(), 'test2' => new \stdClass);
|
||||
$json = '{
|
||||
"test": [
|
||||
|
||||
],
|
||||
"test2": {
|
||||
|
||||
}
|
||||
}';
|
||||
$this->assertJsonFormat($json, $data);
|
||||
}
|
||||
|
||||
public function testEscape()
|
||||
{
|
||||
$data = array("Metadata\\\"" => 'src/');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue