diff --git a/src/Tempest/Http/src/Status.php b/src/Tempest/Http/src/Status.php index 11f9b6e7b..395eab2b7 100644 --- a/src/Tempest/Http/src/Status.php +++ b/src/Tempest/Http/src/Status.php @@ -131,7 +131,7 @@ public function description(): string 415 => 'Unsupported Media Type', 416 => 'Range Not Satisfiable', 417 => 'Expectation Failed', - 418 => 'I Am A Teapot', + 418 => "I'm a teapot", 421 => 'Misdirected Request', 422 => 'Unprocessable Content', 423 => 'Locked', diff --git a/src/Tempest/Http/tests/StatusTest.php b/src/Tempest/Http/tests/StatusTest.php index 4941846d5..b4039b901 100644 --- a/src/Tempest/Http/tests/StatusTest.php +++ b/src/Tempest/Http/tests/StatusTest.php @@ -13,10 +13,10 @@ */ final class StatusTest extends TestCase { - private function descriptionToStatus(string $description): Status + private static function descriptionToStatus(string $description): Status { $description = strtoupper( - str_replace([' ', '-'], '_', $description), + str_replace("'", '', str_replace([' ', '-'], '_', $description)), ); return Status::{$description}; @@ -28,7 +28,7 @@ public function test_status_code(int $code, string $description): void $status = Status::code($code); $this->assertSame( - $this->descriptionToStatus($description), + self::descriptionToStatus($description), $status, ); @@ -100,6 +100,7 @@ public static function provide_status_code_cases(): iterable [303, 'See Other'], [304, 'Not Modified'], [305, 'Use Proxy'], + [306, 'Unused'], [307, 'Temporary Redirect'], [308, 'Permanent Redirect'], @@ -121,6 +122,7 @@ public static function provide_status_code_cases(): iterable [415, 'Unsupported Media Type'], [416, 'Range Not Satisfiable'], [417, 'Expectation Failed'], + [418, "I'm a teapot"], [421, 'Misdirected Request'], [422, 'Unprocessable Content'], [423, 'Locked'],