You are here

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

@dataProvider getStatusCodeFixtures

File

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

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testSetStatusCode($code, $text, $expectedText) {
  $response = new Response();
  $response
    ->setStatusCode($code, $text);
  $statusText = new \ReflectionProperty($response, 'statusText');
  $statusText
    ->setAccessible(true);
  $this
    ->assertEquals($expectedText, $statusText
    ->getValue($response));
}