Example #1
0
 /**
  * Sending an internal server error when debugging is enabled
  * 
  * @covers ::enableDebug
  * @covers ::sendInternalServerError
  * @test
  */
 public function sendInternalServerErrorWithDebug()
 {
     // Get response and enable debugging
     $response = new Response();
     $response->enableDebug();
     // Get response when an exception is is set
     $responseBody = \json_decode($response->sendInternalServerError(new \Exception()), true);
     // Assert message and trace data are set
     $this->assertArrayHasKey('message', $responseBody);
     $this->assertArrayHasKey('trace', $responseBody);
 }