/** * This function tests, that bodies are correctly stored and rendered */ public function testBodyStoringAndRendering() { Config::getInstance()->clear(); $this->response->setRenderedBody('test body 1'); $this->assertEquals('test body 1', $this->response->getRenderedBody(), 'HttpResponse does not correctly store or render a plain text body.'); $view = new ViewMock(); $view->set('test body 2'); $this->response->setBody($view); $this->assertEquals('test body 2', $this->response->getRenderedBody(), 'HttpResponse does not correctly store or render an ViewAbstract body.'); }