/** * Sends 406 when requesting with an Unrecognized Content-Type * * @expectedException HTTP_Exception * @expectedExceptionCode 406 * @group rest.url.default */ function testSends406WhenRequestingResourceWithAnInvalidContentType() { Rest_Response_Format::factory('text'); }
public function __construct(Request $request, Response $response) { parent::__construct($request, $response); $this->_content_format = Rest_Response_Format::factory($this->request->headers('accept')); }