Пример #1
0
 public function testReplaceRequestAndResponseMidStream()
 {
     $request = new Request\Http('http://example.com/index/replace');
     $this->_controller->setResponse(new Response\Cli());
     $response = new Response\Http();
     $responsePost = $this->_controller->dispatch($request, $response);
     $requestPost = $this->_controller->getRequest();
     $this->assertNotSame($request, $requestPost);
     $this->assertNotSame($response, $responsePost);
     $this->assertContains('Reset action called', $responsePost->getBody());
     $this->assertNotContains('Reset action called', $response->getBody());
 }