$this->
assertEquals(\JSON_HEX_TAG | \JSON_HEX_APOS | \JSON_HEX_AMP | \JSON_HEX_QUOT,
$response->
getEncodingOptions());
} public function testSetEncodingOptions() { $response =
new JsonResponse();
$response->
setData([[1, 2, 3
]]);
$this->
assertEquals('[[1,2,3]]',
$response->
getContent());
$response->
setEncodingOptions(\JSON_FORCE_OBJECT
);
$this->
assertEquals('{"0":{"0":1,"1":2,"2":3}}',
$response->
getContent());
} public function testItAcceptsJsonAsString() { $response = JsonResponse::
fromJsonString('{"foo":"bar"}'
);
$this->
assertSame('{"foo":"bar"}',
$response->
getContent());
} public function testSetCallbackInvalidIdentifier() {