public function renderException($message, $exception) { Common::sendHeader('Content-Type: text/html; charset=utf-8', true); return 'Error: ' . $message; }
public function test_renderException_shouldRespectNewlines() { $response = $this->builder->renderException("The\nerror\nmessage", new \Exception('The other message')); $this->assertEquals('Error: The error message', $response); }