Example #1
0
 /**
  * This is weak sauce. Their is very little testing of the behaviour,
  * but maybe that needs to be done as an integration test anyway.
  */
 public function testSendBodyResponse()
 {
     $bodyString = "Hello world";
     $body = new TextBody($bodyString);
     $request = new CLIRequest("/", "example.com");
     $headersSet = new HeadersSet();
     $emitter = new TextEmitter();
     ob_start();
     Tier::sendBodyResponse($body, $request, $headersSet, $emitter);
     $contents = ob_get_contents();
     ob_end_clean();
     $this->assertEquals($bodyString, $contents);
 }