You are here

public function JsonResponseTest::testStaticCreateWithCustomHeaders 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::testStaticCreateWithCustomHeaders()

File

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

Class

JsonResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testStaticCreateWithCustomHeaders() {
  $response = JsonResponse::create(array(), 200, array(
    'ETag' => 'foo',
  ));
  $this
    ->assertSame('application/json', $response->headers
    ->get('Content-Type'));
  $this
    ->assertSame('foo', $response->headers
    ->get('ETag'));
}