public function JsonResponseTest::testSetCallback in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/JsonResponseTest.php \Symfony\Component\HttpFoundation\Tests\JsonResponseTest::testSetCallback()
File
- vendor/
symfony/ http-foundation/ Tests/ JsonResponseTest.php, line 154
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testSetCallback() {
$response = JsonResponse::create(array(
'foo' => 'bar',
))
->setCallback('callback');
$this
->assertEquals('/**/callback({"foo":"bar"});', $response
->getContent());
$this
->assertEquals('text/javascript', $response->headers
->get('Content-Type'));
}