mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixed tests affected by the visibility changes.
This commit is contained in:
parent
dbb87a0196
commit
c60abb1802
3 changed files with 29 additions and 25 deletions
|
@ -278,7 +278,7 @@ class Scaffold {
|
|||
|
||||
return $this->_scaffoldForm($formAction);
|
||||
} elseif ($this->controller->scaffoldError($action) === false) {
|
||||
return $this->scaffoldError();
|
||||
return $this->_scaffoldError();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -56,28 +56,32 @@ class ApiShellTest extends CakeTestCase {
|
|||
|
||||
$expected = array(
|
||||
'1. afterFilter()',
|
||||
'2. beforeFilter()',
|
||||
'3. beforeRedirect($url, $status = NULL, $exit = true)',
|
||||
'4. beforeRender()',
|
||||
'5. constructClasses()',
|
||||
'6. disableCache()',
|
||||
'7. flash($message, $url, $pause = 1, $layout = \'flash\')',
|
||||
'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()'
|
||||
'2. afterScaffoldSave($method)',
|
||||
'3. afterScaffoldSaveError($method)',
|
||||
'4. beforeFilter()',
|
||||
'5. beforeRedirect($url, $status = NULL, $exit = true)',
|
||||
'6. beforeRender()',
|
||||
'7. beforeScaffold($method)',
|
||||
'8. constructClasses()',
|
||||
'9. disableCache()',
|
||||
'10. flash($message, $url, $pause = 1, $layout = \'flash\')',
|
||||
'11. header($status)',
|
||||
'12. httpCodes($code = NULL)',
|
||||
'13. invokeAction($request)',
|
||||
'14. loadModel($modelClass = NULL, $id = NULL)',
|
||||
'15. paginate($object = NULL, $scope = array (), $whitelist = array ())',
|
||||
'16. postConditions($data = array (), $op = NULL, $bool = \'AND\', $exclusive = false)',
|
||||
'17. redirect($url, $status = NULL, $exit = true)',
|
||||
'18. referer($default = NULL, $local = false)',
|
||||
'19. render($view = NULL, $layout = NULL)',
|
||||
'20. scaffoldError($method)',
|
||||
'21. set($one, $two = NULL)',
|
||||
'22. setAction($action)',
|
||||
'23. setRequest($request)',
|
||||
'24. shutdownProcess()',
|
||||
'25. startupProcess()',
|
||||
'26. validate()',
|
||||
'27. validateErrors()'
|
||||
);
|
||||
$this->Shell->expects($this->at(2))->method('out')->with($expected);
|
||||
|
||||
|
|
|
@ -65,11 +65,11 @@ class ScaffoldMockControllerWithFields extends Controller {
|
|||
public $scaffold;
|
||||
|
||||
/**
|
||||
* function _beforeScaffold
|
||||
* function beforeScaffold
|
||||
*
|
||||
* @param string method
|
||||
*/
|
||||
function _beforeScaffold($method) {
|
||||
public function beforeScaffold($method) {
|
||||
$this->set('scaffoldFields', array('title'));
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue