/** * Test that with returnResponse set to false, output is echoed and equals that in the response */ public function testReturnResponseReturnsResponse() { $request = new Request\Http('http://framework.zend.com/foo/bar/var1/baz'); $this->_controller->setResponse(new Response\Cli()); $this->_controller->setRouter(new Router\Rewrite()); $this->_controller->returnResponse(false); ob_start(); $this->_controller->dispatch($request); $body = ob_get_clean(); $actual = $this->_controller->getResponse()->getBody(); $this->assertContains($actual, $body); }