Making ThemeView test pass

This commit is contained in:
José Lorenzo Rodríguez 2010-12-19 23:49:20 -04:30
parent b2ad8fe113
commit 2cb2609a43
2 changed files with 2 additions and 3 deletions

View file

@ -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;
}

View file

@ -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';