public function getMessage() { $code = $this->getCode(); if (!array_key_exists($code, $this->_messageMap)) { throw new \Ergo\Routing\Exception("Unknown HTTP status code: {$code}"); } return $this->_messageMap[$code]; }
public function testTeaPot() { $status = new Http\Status(418); $this->assertEquals($status->getMessage(), "I'm a Teapot"); }