Skip to content

Commit b84b46b

Browse files
committed
[HttpFoundation] added some unit tests (refs symfony#4510)
1 parent ab5abf6 commit b84b46b

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,4 +104,11 @@ public function testSetCallbackInvalidIdentifier()
104104
$this->setExpectedException('InvalidArgumentException');
105105
$response->setCallback('+invalid');
106106
}
107+
108+
public function testJsonEncodeFlags()
109+
{
110+
$response = new JsonResponse('<>\'&"');
111+
112+
$this->assertEquals('"\u003C\u003E\u0027\u0026\u0022"', $response->getContent());
113+
}
107114
}

0 commit comments

Comments
 (0)