From 3874a11238cb425f984dcc9157db5f7e5bdd60b6 Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 22 Jun 2014 11:00:31 +0200 Subject: [PATCH] Update json test --- tests/Composer/Test/Json/JsonFileTest.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tests/Composer/Test/Json/JsonFileTest.php b/tests/Composer/Test/Json/JsonFileTest.php index 4c96720da..f8fdb66ed 100644 --- a/tests/Composer/Test/Json/JsonFileTest.php +++ b/tests/Composer/Test/Json/JsonFileTest.php @@ -131,7 +131,17 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase public function testFormatEmptyArray() { $data = array('test' => array(), 'test2' => new \stdClass); - $json = '{ + if ( + (PHP_VERSION_ID < 50500 && PHP_VERSION_ID >= 50429) + || (PHP_VERSION_ID < 50600 && PHP_VERSION_ID >= 50513) + || (PHP_VERSION_ID >= 50600) + ) { + $json = '{ + "test": [], + "test2": {} +}'; + } else { + $json = '{ "test": [ ], @@ -139,6 +149,8 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase } }'; + + } $this->assertJsonFormat($json, $data); }