mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-17 06:59:51 +00:00
Backport #6431
This commit is contained in:
parent
c31fcd6f39
commit
309aee9fe5
2 changed files with 4 additions and 3 deletions
|
@ -68,6 +68,7 @@ class CakeResponse {
|
||||||
415 => 'Unsupported Media Type',
|
415 => 'Unsupported Media Type',
|
||||||
416 => 'Requested range not satisfiable',
|
416 => 'Requested range not satisfiable',
|
||||||
417 => 'Expectation Failed',
|
417 => 'Expectation Failed',
|
||||||
|
429 => 'Too Many Requests',
|
||||||
500 => 'Internal Server Error',
|
500 => 'Internal Server Error',
|
||||||
501 => 'Not Implemented',
|
501 => 'Not Implemented',
|
||||||
502 => 'Bad Gateway',
|
502 => 'Bad Gateway',
|
||||||
|
|
|
@ -404,7 +404,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
public function testHttpCodes() {
|
public function testHttpCodes() {
|
||||||
$response = new CakeResponse();
|
$response = new CakeResponse();
|
||||||
$result = $response->httpCodes();
|
$result = $response->httpCodes();
|
||||||
$this->assertEquals(40, count($result));
|
$this->assertEquals(41, count($result));
|
||||||
|
|
||||||
$result = $response->httpCodes(100);
|
$result = $response->httpCodes(100);
|
||||||
$expected = array(100 => 'Continue');
|
$expected = array(100 => 'Continue');
|
||||||
|
@ -417,7 +417,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
|
|
||||||
$result = $response->httpCodes($codes);
|
$result = $response->httpCodes($codes);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
$this->assertEquals(42, count($response->httpCodes()));
|
$this->assertEquals(43, count($response->httpCodes()));
|
||||||
|
|
||||||
$result = $response->httpCodes(381);
|
$result = $response->httpCodes(381);
|
||||||
$expected = array(381 => 'Unicorn Moved');
|
$expected = array(381 => 'Unicorn Moved');
|
||||||
|
@ -426,7 +426,7 @@ class CakeResponseTest extends CakeTestCase {
|
||||||
$codes = array(404 => 'Sorry Bro');
|
$codes = array(404 => 'Sorry Bro');
|
||||||
$result = $response->httpCodes($codes);
|
$result = $response->httpCodes($codes);
|
||||||
$this->assertTrue($result);
|
$this->assertTrue($result);
|
||||||
$this->assertEquals(42, count($response->httpCodes()));
|
$this->assertEquals(43, count($response->httpCodes()));
|
||||||
|
|
||||||
$result = $response->httpCodes(404);
|
$result = $response->httpCodes(404);
|
||||||
$expected = array(404 => 'Sorry Bro');
|
$expected = array(404 => 'Sorry Bro');
|
||||||
|
|
Loading…
Add table
Reference in a new issue