Skip to content
Permalink
Browse files

Added un-merged improvements from #9528

Revert 306 unused

fix test case to account for previous missing http status code
  • Loading branch information...
inoas committed Sep 27, 2016
1 parent ca96417 commit 9e71a5385dba6a13c2db1b0f1fae95a42acbd75e
Showing with 6 additions and 5 deletions.
  1. +3 −2 src/Network/Response.php
  2. +3 −3 tests/TestCase/Network/ResponseTest.php
@@ -67,7 +67,7 @@ class Response
405 => 'Method Not Allowed',
406 => 'Not Acceptable',
407 => 'Proxy Authentication Required',
408 => 'Request Time-out',
408 => 'Request Timeout',
409 => 'Conflict',
410 => 'Gone',
411 => 'Length Required',
@@ -78,6 +78,7 @@ class Response
416 => 'Requested range not satisfiable',
417 => 'Expectation Failed',
418 => 'I\'m a teapot',
421 => 'Misdirected Request',
422 => 'Unprocessable Entity',
423 => 'Locked',
424 => 'Failed Dependency',
@@ -93,7 +94,7 @@ class Response
501 => 'Not Implemented',
502 => 'Bad Gateway',
503 => 'Service Unavailable',
504 => 'Gateway Time-out',
504 => 'Gateway Timeout',
505 => 'Unsupported Version',
506 => 'Variant Also Negotiates',
507 => 'Insufficient Storage',
@@ -459,7 +459,7 @@ public function testHttpCodes()
{
$response = new Response();
$result = $response->httpCodes();
$this->assertEquals(64, count($result));
$this->assertEquals(65, count($result));
$result = $response->httpCodes(100);
$expected = [100 => 'Continue'];
@@ -472,7 +472,7 @@ public function testHttpCodes()
$result = $response->httpCodes($codes);
$this->assertTrue($result);
$this->assertEquals(66, count($response->httpCodes()));
$this->assertEquals(67, count($response->httpCodes()));
$result = $response->httpCodes(381);
$expected = [381 => 'Unicorn Moved'];
@@ -481,7 +481,7 @@ public function testHttpCodes()
$codes = [404 => 'Sorry Bro'];
$result = $response->httpCodes($codes);
$this->assertTrue($result);
$this->assertEquals(66, count($response->httpCodes()));
$this->assertEquals(67, count($response->httpCodes()));
$result = $response->httpCodes(404);
$expected = [404 => 'Sorry Bro'];

0 comments on commit 9e71a53

Please sign in to comment.
You can’t perform that action at this time.