/** * Test that a custom reason phrase can be set and accessed * * @param integer $code * @param string $message * @dataProvider fakeReasonPhraseProvider */ public function testCustomReasonPhraseSet($code, $message) { $response = new Aspamia_Http_Response($code, array(), '', '1.1', $message); // Test code and message are correct $this->assertEquals($code, $response->getStatus()); $this->assertEquals($message, $response->getMessage()); }
/** * Called before the response is sent. The response object is passed in * * @param Aspamia_Http_Response $response */ public function preResponse(Aspamia_Http_Response $response) { $bodySize = $response->getHeader('content-length'); $this->_log->info("Response: {$response->getStatus()} {$response->getMessage()}, {$bodySize} bytes of data"); }