mirror of
https://github.com/composer/composer
synced 2025-05-11 01:22:54 +00:00
Normalize json across all php versions, fixes #3226
This commit is contained in:
parent
3d1a094535
commit
109f4ffd5e
3 changed files with 11 additions and 14 deletions
|
@ -131,21 +131,10 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase
|
|||
public function testFormatEmptyArray()
|
||||
{
|
||||
$data = array('test' => array(), 'test2' => new \stdClass);
|
||||
if (PHP_VERSION_ID < 50428 || (PHP_VERSION_ID >= 50500 && PHP_VERSION_ID < 50512)) {
|
||||
$json = '{
|
||||
"test": [
|
||||
|
||||
],
|
||||
"test2": {
|
||||
|
||||
}
|
||||
}';
|
||||
} else {
|
||||
$json = '{
|
||||
$json = '{
|
||||
"test": [],
|
||||
"test2": {}
|
||||
}';
|
||||
}
|
||||
$this->assertJsonFormat($json, $data);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue