public function testSetContentType() { $response = new THttpResponse(); $response->init(null); $response->setContentType('image/jpeg'); self::assertEquals('image/jpeg', $response->getContentType()); $response->setContentType('text/plain'); self::assertEquals('text/plain', $response->getContentType()); }
/** * Sets the correct response headers * @param THttpResponse $response */ public function createResponseHeaders($response) { $response->setContentType('text/xml'); $response->setCharset('UTF-8'); }
/** * Sets the correct response headers * @param THttpResponse $response */ public function createResponseHeaders($response) { $response->setContentType('application/json'); $response->setCharset('UTF-8'); }