From a78bb20bdabed0a7cdfe41e9cb9ac1570ea0e607 Mon Sep 17 00:00:00 2001 From: mark_story Date: Sun, 18 Jul 2010 21:28:52 -0400 Subject: [PATCH] Fixing failing test in ControllerTest caused by ThemeView not being correctly found if it was not in the mapped files. --- cake/tests/cases/libs/controller/controller.test.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/cake/tests/cases/libs/controller/controller.test.php b/cake/tests/cases/libs/controller/controller.test.php index f588b82a1..4110f8065 100644 --- a/cake/tests/cases/libs/controller/controller.test.php +++ b/cake/tests/cases/libs/controller/controller.test.php @@ -910,8 +910,12 @@ class ControllerTest extends CakeTestCase { * @return void */ function testComponentBeforeRenderChangingViewClass() { + $core = App::core('views'); App::build(array( - 'views' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS) + 'views' => array( + TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'views'. DS, + $core[0] + ) ), true); $Controller =& new Controller(); $Controller->uses = array(); @@ -921,7 +925,7 @@ class ControllerTest extends CakeTestCase { $Controller->viewPath = 'posts'; $Controller->theme = 'test_theme'; $result = $Controller->render('index'); - $this->assertPattern('/posts index themed view/', $result); + $this->assertPattern('/default test_theme layout/', $result); App::build(); }