public function JsonResponseTest::testStaticCreateWithCustomHeaders

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/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'));
}