You are here

public function ResponseTest::testDefaultContentType in Zircon Profile 8.0

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

File

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

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testDefaultContentType() {
  $headerMock = $this
    ->getMock('Symfony\\Component\\HttpFoundation\\ResponseHeaderBag', array(
    'set',
  ));
  $headerMock
    ->expects($this
    ->at(0))
    ->method('set')
    ->with('Content-Type', 'text/html');
  $headerMock
    ->expects($this
    ->at(1))
    ->method('set')
    ->with('Content-Type', 'text/html; charset=UTF-8');
  $response = new Response('foo');
  $response->headers = $headerMock;
  $response
    ->prepare(new Request());
}