public function testCanRenderStringPayload()
 {
     $twiml = '<?xml version="1.0" encoding="UTF-8"?><Response><Say>Hello</Say></Response>';
     $model = new TwilioModel(array('payload' => $twiml));
     $model->setContentType('application/xml');
     $test = $this->renderer->render($model);
     $this->assertEquals('<?xml version="1.0" encoding="UTF-8"?><Response><Say>Hello</Say></Response>', str_replace("\n", "", $test));
 }
Exemplo n.º 2
0
 public function testContentTypeCanBeExplicitlySet()
 {
     $contentType = 'application/json';
     $this->model->setContentType($contentType);
     $this->assertEquals($contentType, $this->model->getContentType());
 }