public function ResponseTest::testCreate

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/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'));
}