Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit ec3de84c4e1357b1b80ee760b51d729d9afbb1a9 1 parent 4101388
@markstory markstory authored markstory committed
View
9 lib/Cake/Controller/Controller.php
@@ -581,15 +581,6 @@ public function constructClasses() {
}
/**
- * 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
2  lib/Cake/Controller/Scaffold.php
@@ -159,7 +159,7 @@ public function __construct(Controller $controller, CakeRequest $request) {
*/
protected function _output() {
$this->controller->afterFilter();
- $this->controller->getResponse()->send();
+ $this->controller->response->send();
}
/**
View
33 lib/Cake/Test/Case/Console/Command/ApiShellTest.php
@@ -62,23 +62,22 @@ public function testMethodNameDetection () {
'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
4 lib/Cake/Test/Case/Controller/PagesControllerTest.php
@@ -52,12 +52,12 @@ public function testDisplay() {
$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');
}
Please sign in to comment.
Something went wrong with that request. Please try again.