From 649b863fc5a2452d1c2bc8a670cf834b391fe588 Mon Sep 17 00:00:00 2001 From: Jose Lorenzo Rodriguez Date: Fri, 13 May 2011 03:19:00 -0430 Subject: [PATCH] Changing more strings after renaming folders --- lib/Cake/Test/Case/View/ThemeViewTest.php | 24 +++++++++++------------ lib/Cake/View/ThemeView.php | 6 +++--- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/lib/Cake/Test/Case/View/ThemeViewTest.php b/lib/Cake/Test/Case/View/ThemeViewTest.php index 05d1d8161..8ae0f78d5 100644 --- a/lib/Cake/Test/Case/View/ThemeViewTest.php +++ b/lib/Cake/Test/Case/View/ThemeViewTest.php @@ -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'; diff --git a/lib/Cake/View/ThemeView.php b/lib/Cake/View/ThemeView.php index df85282b7..622ce2a28 100644 --- a/lib/Cake/View/ThemeView.php +++ b/lib/Cake/View/ThemeView.php @@ -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);