Beispiel #1
0
 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());
 }
Beispiel #2
0
 /**
  * Sets the correct response headers
  * @param THttpResponse $response
  */
 public function createResponseHeaders($response)
 {
     $response->setContentType('text/xml');
     $response->setCharset('UTF-8');
 }
Beispiel #3
0
 /**
  * Sets the correct response headers
  * @param THttpResponse $response
  */
 public function createResponseHeaders($response)
 {
     $response->setContentType('application/json');
     $response->setCharset('UTF-8');
 }