From 8881cec1742cc7e56bfc0e33b08f785ae53b78dc Mon Sep 17 00:00:00 2001 From: Jordi Boggiano Date: Sun, 29 Jun 2014 12:26:48 +0200 Subject: [PATCH] Simplify version ranges (hopefully includes hhvm), refs #3049 --- tests/Composer/Test/Json/JsonFileTest.php | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/tests/Composer/Test/Json/JsonFileTest.php b/tests/Composer/Test/Json/JsonFileTest.php index f8fdb66ed..6e0c46f12 100644 --- a/tests/Composer/Test/Json/JsonFileTest.php +++ b/tests/Composer/Test/Json/JsonFileTest.php @@ -131,16 +131,7 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase public function testFormatEmptyArray() { $data = array('test' => array(), 'test2' => new \stdClass); - 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 { + if (PHP_VERSION_ID < 50429 || (PHP_VERSION_ID >= 50500 && PHP_VERSION_ID < 50513)) { $json = '{ "test": [ @@ -149,7 +140,11 @@ class JsonFileTest extends \PHPUnit_Framework_TestCase } }'; - + } else { + $json = '{ + "test": [], + "test2": {} +}'; } $this->assertJsonFormat($json, $data); }