Skip to content

Commit b5ee7c3

Browse files
author
Michael Moravec
committed
Set serialize_precision explicitly to avoid fancy float rounding
1 parent 9f1d1d8 commit b5ee7c3

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Symfony/Component/HttpFoundation/Tests/JsonResponseTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,15 @@
1616

1717
class JsonResponseTest extends TestCase
1818
{
19+
protected function setUp()
20+
{
21+
parent::setUp();
22+
23+
if (!defined('HHVM_VERSION')) {
24+
$this->iniSet('serialize_precision', 14);
25+
}
26+
}
27+
1928
public function testConstructorEmptyCreatesJsonObject()
2029
{
2130
$response = new JsonResponse();

0 commit comments

Comments
 (0)