1
0
Fork 0
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:
Jordi Boggiano 2014-10-04 17:00:12 +01:00
parent 3d1a094535
commit 109f4ffd5e
3 changed files with 11 additions and 14 deletions

View file

@ -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);
}