You are here

public function ResponseTest::testCreate 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::testCreate()

File

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

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testCreate() {
  $response = Response::create('foo', 301, array(
    'Foo' => 'bar',
  ));
  $this
    ->assertInstanceOf('Symfony\\Component\\HttpFoundation\\Response', $response);
  $this
    ->assertEquals(301, $response
    ->getStatusCode());
  $this
    ->assertEquals('bar', $response->headers
    ->get('foo'));
}