示例#1
0
 /**
  * get CLI Response
  *
  * @return Cli\Response
  */
 public function initResponse()
 {
     $response = new Cli\Response();
     if ($config = Config::getData('response')) {
         $response->setOptions($config);
     }
     Response::setInstance($response);
 }
示例#2
0
 /**
  * Test Response Body
  */
 public function testSendBodyWithView()
 {
     $this->expectOutputString("foo: bar\n");
     $view = new View();
     $view->foo = 'bar';
     $response = new Response();
     $response->setBody($view);
     $response->send();
 }