You are here

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

File

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

Class

ResponseTest

Namespace

Symfony\Component\HttpFoundation\Tests

Code

public function testIsServerOrClientError() {
  $response = new Response('', 404);
  $this
    ->assertTrue($response
    ->isClientError());
  $this
    ->assertFalse($response
    ->isServerError());
  $response = new Response('', 500);
  $this
    ->assertFalse($response
    ->isClientError());
  $this
    ->assertTrue($response
    ->isServerError());
}