From b5ee7c3ccd9a407d847b51652ff7b28f7602447d Mon Sep 17 00:00:00 2001 From: Michael Moravec Date: Tue, 19 Jun 2018 13:59:09 +0200 Subject: [PATCH] Set serialize_precision explicitly to avoid fancy float rounding --- .../Component/HttpFoundation/Tests/JsonResponseTest.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php b/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php index e15505cc69..0559b5ba0f 100644 --- a/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php +++ b/src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php @@ -16,6 +16,15 @@ use Symfony\Component\HttpFoundation\JsonResponse; class JsonResponseTest extends TestCase { + protected function setUp() + { + parent::setUp(); + + if (!defined('HHVM_VERSION')) { + $this->iniSet('serialize_precision', 14); + } + } + public function testConstructorEmptyCreatesJsonObject() { $response = new JsonResponse();