fail("Important HTTP status code '{$code}' not recognized."); } else { $this->assertEquals( $code, $enum->value, "The return value of 'Status::{$enum->name}' '{$enum->value}' is not the expected '{$code}' value." ); } } } /** * This test checks if the status code is within the boundary of 100 to 599. * This test is needed to trigger an error if the status code is out of the boundary. As some parts * of the codebase expect the status code to be within this boundary. */ public function test_status_code_boundary() { foreach (Status::cases() as $code) { $this->assertTrue( $code->value >= 100 && $code->value <= 599, "HTTP Status Code 'Status::{$code->name}' '{$code->value}' is out of boundary." ); } } }