Skip to content

Commit

Permalink
Backport #6431
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark Scherer committed Apr 30, 2015
1 parent c31fcd6 commit 309aee9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions lib/Cake/Network/CakeResponse.php
Expand Up @@ -68,6 +68,7 @@ class CakeResponse {
415 => 'Unsupported Media Type',
416 => 'Requested range not satisfiable',
417 => 'Expectation Failed',
429 => 'Too Many Requests',
500 => 'Internal Server Error',
501 => 'Not Implemented',
502 => 'Bad Gateway',
Expand Down
6 changes: 3 additions & 3 deletions lib/Cake/Test/Case/Network/CakeResponseTest.php
Expand Up @@ -404,7 +404,7 @@ public function testCompress() {
public function testHttpCodes() {
$response = new CakeResponse();
$result = $response->httpCodes();
$this->assertEquals(40, count($result));
$this->assertEquals(41, count($result));

$result = $response->httpCodes(100);
$expected = array(100 => 'Continue');
Expand All @@ -417,7 +417,7 @@ public function testHttpCodes() {

$result = $response->httpCodes($codes);
$this->assertTrue($result);
$this->assertEquals(42, count($response->httpCodes()));
$this->assertEquals(43, count($response->httpCodes()));

$result = $response->httpCodes(381);
$expected = array(381 => 'Unicorn Moved');
Expand All @@ -426,7 +426,7 @@ public function testHttpCodes() {
$codes = array(404 => 'Sorry Bro');
$result = $response->httpCodes($codes);
$this->assertTrue($result);
$this->assertEquals(42, count($response->httpCodes()));
$this->assertEquals(43, count($response->httpCodes()));

$result = $response->httpCodes(404);
$expected = array(404 => 'Sorry Bro');
Expand Down

0 comments on commit 309aee9

Please sign in to comment.