Esempio n. 1
0
 public function testSetCharset()
 {
     $response = new THttpResponse();
     $response->init(null);
     $response->setCharset('UTF-8');
     self::assertEquals('UTF-8', $response->getCharset());
     $response->setCharset('ISO8859-1');
     self::assertEquals('ISO8859-1', $response->getCharset());
 }
Esempio n. 2
0
 /**
  * Sets the correct response headers
  * @param THttpResponse $response
  */
 public function createResponseHeaders($response)
 {
     $response->setContentType('text/xml');
     $response->setCharset('UTF-8');
 }
Esempio n. 3
0
 /**
  * Sets the correct response headers
  * @param THttpResponse $response
  */
 public function createResponseHeaders($response)
 {
     $response->setContentType('application/json');
     $response->setCharset('UTF-8');
 }