public renderException ( $message, Exception | Throwable $exception ) : string | ||
$message | ||
$exception | Exception | Throwable | |
return | string |
public function renderException($message, $exception)
{
self::sendHeader();
return 'Error: ' . $message;
}
public function test_renderException_shouldThrowTheException() { $response = $this->builder->renderException('This message should be used', new \BadMethodCallException('The other message')); $this->assertEquals('Error: This message should be used', $response); }