public function ResponseTest::testPrepareDoesNothingIfContentTypeIsSet

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php, line 329

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testPrepareDoesNothingIfContentTypeIsSet() {
  $response = new Response('foo');
  $response->headers
    ->set('Content-Type', 'text/plain');
  $response
    ->prepare(new Request());
  $this
    ->assertEquals('text/plain; charset=UTF-8', $response->headers
    ->get('content-type'));
}