You are here

public function JsonResponseTest::testStaticCreateWithCustomContentType in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/symfony/http-foundation/Tests/JsonResponseTest.php \Symfony\Component\HttpFoundation\Tests\JsonResponseTest::testStaticCreateWithCustomContentType()

File

vendor/symfony/http-foundation/Tests/JsonResponseTest.php, line 146

Class

JsonResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testStaticCreateWithCustomContentType() {
  $headers = array(
    'Content-Type' => 'application/vnd.acme.blog-v1+json',
  );
  $response = JsonResponse::create(array(), 200, $headers);
  $this
    ->assertSame('application/vnd.acme.blog-v1+json', $response->headers
    ->get('Content-Type'));
}