Browse Source

Making ThemeView test pass

José Lorenzo Rodríguez 15 years ago
parent
commit
2cb2609a43
2 changed files with 2 additions and 3 deletions
  1. 1 1
      lib/Cake/View/ThemeView.php
  2. 1 2
      lib/Cake/tests/cases/libs/view/theme.test.php

+ 1 - 1
lib/Cake/View/ThemeView.php

@@ -60,7 +60,7 @@ class ThemeView extends View {
 			$count = count($paths);
 			for ($i = 0; $i < $count; $i++) {
 				if (strpos($paths[$i], DS . 'plugins' . DS) === false
-					&& strpos($paths[$i], DS . 'libs' . DS . 'view') === false) {
+					&& strpos($paths[$i], DS . 'Cake' . DS . 'View') === false) {
 						if ($plugin) {
 							$themePaths[] = $paths[$i] . 'themed'. DS . $this->theme . DS . 'plugins' . DS . $plugin . DS;
 						}

+ 1 - 2
lib/Cake/tests/cases/libs/view/theme.test.php

@@ -122,7 +122,7 @@ class ThemeViewTest extends CakeTestCase {
 		$this->ThemeView = new ThemeView($this->PostsController);
 		App::build(array(
 			'plugins' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'plugins' . DS),
-			'views' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS)
+			'View' => array(LIBS . 'tests' . DS . 'test_app' . DS . 'views'. DS)
 		));
 	}
 
@@ -156,7 +156,6 @@ class ThemeViewTest extends CakeTestCase {
 		$ThemeView = new TestThemeView($this->Controller);
 		$expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'test_plugin' . DS . 'tests' . DS .'index.ctp';
 		$result = $ThemeView->getViewFileName('index');
-		debug($expected);
 		$this->assertEqual($result, $expected);
 
 		$expected = LIBS . 'tests' . DS . 'test_app' . DS . 'views' . DS . 'themed' . DS . 'test_theme' . DS . 'plugins' . DS . 'test_plugin' . DS . 'layouts' . DS .'plugin_default.ctp';