public function ResponseTest::testIsInvalid in Zircon Profile 8
Same name and namespace in other branches
- 8.0 vendor/symfony/http-foundation/Tests/ResponseTest.php \Symfony\Component\HttpFoundation\Tests\ResponseTest::testIsInvalid()
File
- vendor/
symfony/ http-foundation/ Tests/ ResponseTest.php, line 650
Class
Namespace
Symfony\Component\HttpFoundation\TestsCode
public function testIsInvalid() {
$response = new Response();
try {
$response
->setStatusCode(99);
$this
->fail();
} catch (\InvalidArgumentException $e) {
$this
->assertTrue($response
->isInvalid());
}
try {
$response
->setStatusCode(650);
$this
->fail();
} catch (\InvalidArgumentException $e) {
$this
->assertTrue($response
->isInvalid());
}
$response = new Response('', 200);
$this
->assertFalse($response
->isInvalid());
}