diff --git a/Tests/JsonResponseTest.php b/Tests/JsonResponseTest.php index e5443c0b8..a779a5f40 100644 --- a/Tests/JsonResponseTest.php +++ b/Tests/JsonResponseTest.php @@ -190,6 +190,12 @@ public function testConstructorWithObjectWithoutToStringMethodThrowsAnException( new JsonResponse(new \stdClass(), 200, [], true); } + + public function testFloatNumbers() + { + $response = new JsonResponse(['data' => 1.0]); + $this->assertEquals('{"data":1.0}', $response->getContent()); + } } class JsonSerializableObject implements \JsonSerializable