public function ResponseTest::testContentTypeCharset

File

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

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testContentTypeCharset() {
  $response = new Response();
  $response->headers
    ->set('Content-Type', 'text/css');

  // force fixContentType() to be called
  $response
    ->prepare(new Request());
  $this
    ->assertEquals('text/css; charset=UTF-8', $response->headers
    ->get('Content-Type'));
}