mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Changing more strings after renaming folders
This commit is contained in:
parent
7ba60ff424
commit
649b863fc5
2 changed files with 15 additions and 15 deletions
|
@ -147,20 +147,20 @@ class ThemeViewTest extends CakeTestCase {
|
|||
function testPluginThemedGetTemplate() {
|
||||
$this->Controller->plugin = 'TestPlugin';
|
||||
$this->Controller->name = 'TestPlugin';
|
||||
$this->Controller->viewPath = 'tests';
|
||||
$this->Controller->viewPath = 'Tests';
|
||||
$this->Controller->action = 'index';
|
||||
$this->Controller->theme = 'test_theme';
|
||||
|
||||
$ThemeView = new TestThemeView($this->Controller);
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'TestPlugin' . DS . 'tests' . DS .'index.ctp';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Tests' . DS .'index.ctp';
|
||||
$result = $ThemeView->getViewFileName('index');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'TestPlugin' . DS . 'layouts' . DS .'plugin_default.ctp';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'Plugins' . DS . 'TestPlugin' . DS . 'Layouts' . DS .'plugin_default.ctp';
|
||||
$result = $ThemeView->getLayoutFileName('plugin_default');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'layouts' . DS .'default.ctp';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'Layouts' . DS .'default.ctp';
|
||||
$result = $ThemeView->getLayoutFileName('default');
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
@ -174,31 +174,31 @@ class ThemeViewTest extends CakeTestCase {
|
|||
function testGetTemplate() {
|
||||
$this->Controller->plugin = null;
|
||||
$this->Controller->name = 'Pages';
|
||||
$this->Controller->viewPath = 'pages';
|
||||
$this->Controller->viewPath = 'Pages';
|
||||
$this->Controller->action = 'display';
|
||||
$this->Controller->params['pass'] = array('home');
|
||||
|
||||
$ThemeView = new TestThemeView($this->Controller);
|
||||
$ThemeView->theme = 'test_theme';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'pages' . DS .'home.ctp';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS .'Pages' . DS .'home.ctp';
|
||||
$result = $ThemeView->getViewFileName('home');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'posts' . DS .'index.ctp';
|
||||
$result = $ThemeView->getViewFileName('/posts/index');
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'Posts' . DS .'index.ctp';
|
||||
$result = $ThemeView->getViewFileName('/Posts/index');
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'layouts' . DS .'default.ctp';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Themed' . DS . 'test_theme' . DS . 'Layouts' . DS .'default.ctp';
|
||||
$result = $ThemeView->getLayoutFileName();
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$ThemeView->layoutPath = 'rss';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'layouts' . DS . 'rss' . DS . 'default.ctp';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'rss' . DS . 'default.ctp';
|
||||
$result = $ThemeView->getLayoutFileName();
|
||||
$this->assertEqual($result, $expected);
|
||||
|
||||
$ThemeView->layoutPath = 'emails' . DS . 'html';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp';
|
||||
$expected = LIBS . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Layouts' . DS . 'emails' . DS . 'html' . DS . 'default.ctp';
|
||||
$result = $ThemeView->getLayoutFileName();
|
||||
$this->assertEqual($result, $expected);
|
||||
}
|
||||
|
@ -213,7 +213,7 @@ class ThemeViewTest extends CakeTestCase {
|
|||
function testMissingView() {
|
||||
$this->Controller->plugin = null;
|
||||
$this->Controller->name = 'Pages';
|
||||
$this->Controller->viewPath = 'pages';
|
||||
$this->Controller->viewPath = 'Pages';
|
||||
$this->Controller->action = 'display';
|
||||
$this->Controller->theme = 'my_theme';
|
||||
|
||||
|
|
|
@ -57,12 +57,12 @@ class ThemeView extends View {
|
|||
if (!empty($this->theme)) {
|
||||
$count = count($paths);
|
||||
for ($i = 0; $i < $count; $i++) {
|
||||
if (strpos($paths[$i], DS . 'plugins' . DS) === false
|
||||
if (strpos($paths[$i], DS . 'Plugins' . DS) === false
|
||||
&& strpos($paths[$i], DS . 'Cake' . DS . 'View') === false) {
|
||||
if ($plugin) {
|
||||
$themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS . 'plugins' . DS . $plugin . DS;
|
||||
$themePaths[] = $paths[$i] . 'Themed'. DS . $this->theme . DS . 'Plugins' . DS . $plugin . DS;
|
||||
}
|
||||
$themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS;
|
||||
$themePaths[] = $paths[$i] . 'Themed'. DS . $this->theme . DS;
|
||||
}
|
||||
}
|
||||
$paths = array_merge($themePaths, $paths);
|
||||
|
|
Loading…
Add table
Reference in a new issue