mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing controller tests
This commit is contained in:
parent
6713bb154e
commit
e09f825f8b
3 changed files with 6 additions and 6 deletions
|
@ -125,7 +125,7 @@ class Scaffold {
|
|||
}
|
||||
|
||||
$this->ScaffoldModel = $this->controller->{$this->modelClass};
|
||||
$this->scaffoldTitle = Inflector::humanize($this->viewPath);
|
||||
$this->scaffoldTitle = Inflector::humanize(Inflector::underscore($this->viewPath));
|
||||
$this->scaffoldActions = $controller->scaffold;
|
||||
$title_for_layout = __d('cake', 'Scaffold :: ') . Inflector::humanize($request->action) . ' :: ' . $this->scaffoldTitle;
|
||||
$modelClass = $this->controller->modelClass;
|
||||
|
|
|
@ -689,7 +689,7 @@ class ControllerTest extends CakeTestCase {
|
|||
$Controller->constructClasses();
|
||||
$Controller->Test->viewclass = 'Theme';
|
||||
$Controller->viewPath = 'posts';
|
||||
$Controller->theme = 'test_theme';
|
||||
$Controller->theme = 'TestTheme';
|
||||
$result = $Controller->render('index');
|
||||
$this->assertPattern('/default test_theme layout/', $result);
|
||||
App::build();
|
||||
|
|
|
@ -55,10 +55,10 @@ class PagesControllerTest extends CakeTestCase {
|
|||
$this->assertPattern('/posts index/', $Pages->getResponse()->body());
|
||||
$this->assertEqual($Pages->viewVars['page'], 'index');
|
||||
|
||||
$Pages->viewPath = 'themed';
|
||||
$Pages->display('test_theme', 'posts', 'index');
|
||||
$Pages->viewPath = 'Themed';
|
||||
$Pages->display('TestTheme', 'Posts', 'index');
|
||||
$this->assertPattern('/posts index themed view/', $Pages->getResponse()->body());
|
||||
$this->assertEqual($Pages->viewVars['page'], 'test_theme');
|
||||
$this->assertEqual($Pages->viewVars['subpage'], 'posts');
|
||||
$this->assertEqual($Pages->viewVars['page'], 'TestTheme');
|
||||
$this->assertEqual($Pages->viewVars['subpage'], 'Posts');
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue