Permalink
Browse files

What happens when WebDAV is used?

  • Loading branch information...
1 parent a5013bc commit f247d37689dd81f155bb1861ace6373579809603 @odino committed Feb 15, 2012
@@ -858,7 +858,7 @@ public function isNotModified(Request $request)
*/
public function isInvalid()
{
- return $this->statusCode < 100 || $this->statusCode >= 600;
+ return !isset(self::$statusTexts[$this->statusCode]);
}
/**
@@ -354,6 +354,13 @@ public function testIsInvalid()
$this->assertTrue($response->isInvalid());
}
+ try {
+ $response->setStatusCode(422);
+ $this->pass();
+ } catch(\InvalidArgumentException $e) {
+ $this->assertTrue($response->isInvalid());
+ }
+
$response = new Response('', 200);
$this->assertFalse($response->isInvalid());
}

0 comments on commit f247d37

Please sign in to comment.