public function ResponseTest::testIsServerOrClientError

File

drupal/core/vendor/symfony/http-foundation/Symfony/Component/HttpFoundation/Tests/ResponseTest.php, line 598

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());
}