Removing getResponse, its not used and it doesn't serve much purpose.

This commit is contained in:
Mark Story 2011-07-19 22:51:49 -04:00 committed by mark_story
parent 4101388069
commit ec3de84c4e
4 changed files with 19 additions and 29 deletions

View file

@ -580,15 +580,6 @@ class Controller extends Object {
return true;
}
/**
* Gets the response object for this controller. Will construct the response if it has not already been built.
*
* @return CakeResponse
*/
public function getResponse() {
return $this->response;
}
/**
* Perform the startup process for this controller.
* Fire the Components and Controller callbacks in the correct order.

View file

@ -159,7 +159,7 @@ class Scaffold {
*/
protected function _output() {
$this->controller->afterFilter();
$this->controller->getResponse()->send();
$this->controller->response->send();
}
/**

View file

@ -62,23 +62,22 @@ class ApiShellTest extends CakeTestCase {
'5. constructClasses()',
'6. disableCache()',
'7. flash($message, $url, $pause = 1, $layout = \'flash\')',
'8. getResponse()',
'9. header($status)',
'10. httpCodes($code = NULL)',
'11. invokeAction($request)',
'12. loadModel($modelClass = NULL, $id = NULL)',
'13. paginate($object = NULL, $scope = array (), $whitelist = array ())',
'14. postConditions($data = array (), $op = NULL, $bool = \'AND\', $exclusive = false)',
'15. redirect($url, $status = NULL, $exit = true)',
'16. referer($default = NULL, $local = false)',
'17. render($view = NULL, $layout = NULL)',
'18. set($one, $two = NULL)',
'19. setAction($action)',
'20. setRequest($request)',
'21. shutdownProcess()',
'22. startupProcess()',
'23. validate()',
'24. validateErrors()'
'8. header($status)',
'9. httpCodes($code = NULL)',
'10. invokeAction($request)',
'11. loadModel($modelClass = NULL, $id = NULL)',
'12. paginate($object = NULL, $scope = array (), $whitelist = array ())',
'13. postConditions($data = array (), $op = NULL, $bool = \'AND\', $exclusive = false)',
'14. redirect($url, $status = NULL, $exit = true)',
'15. referer($default = NULL, $local = false)',
'16. render($view = NULL, $layout = NULL)',
'17. set($one, $two = NULL)',
'18. setAction($action)',
'19. setRequest($request)',
'20. shutdownProcess()',
'21. startupProcess()',
'22. validate()',
'23. validateErrors()'
);
$this->Shell->expects($this->at(2))->method('out')->with($expected);

View file

@ -52,12 +52,12 @@ class PagesControllerTest extends CakeTestCase {
$Pages->viewPath = 'Posts';
$Pages->display('index');
$this->assertPattern('/posts index/', $Pages->getResponse()->body());
$this->assertPattern('/posts index/', $Pages->response->body());
$this->assertEqual($Pages->viewVars['page'], 'index');
$Pages->viewPath = 'Themed';
$Pages->display('TestTheme', 'Posts', 'index');
$this->assertPattern('/posts index themed view/', $Pages->getResponse()->body());
$this->assertPattern('/posts index themed view/', $Pages->response->body());
$this->assertEqual($Pages->viewVars['page'], 'TestTheme');
$this->assertEqual($Pages->viewVars['subpage'], 'Posts');
}