You are here

public function ResponseTest::testPrepareDoesNothingIfContentTypeIsSet in Zircon Profile 8

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

File

vendor/symfony/http-foundation/Tests/ResponseTest.php, line 465

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'));
}