public function testSending()
 {
     $output = $this->setupOutput();
     $writer = new ResponseWriter($output);
     $response = new Response();
     $response->setRunId('response-writer-run-id');
     $writer->sendResponse($response);
     $this->assertEquals($response->getResponseCode(), \http_response_code());
     $this->assertEquals($response->__toString(), file_get_contents($output));
 }
Example #2
0
 /**
  * Sends the response to the client.
  */
 private function sendResponse()
 {
     $this->responseWriter->sendResponse($this->response);
 }