From f983340d217d604f42ef07c1bb2f3502468c653e Mon Sep 17 00:00:00 2001 From: mark_story Date: Wed, 3 Jun 2009 16:23:35 +0000 Subject: [PATCH] Changing setUp() and tearDown() to startTest() and endTest(). Fixing test failures when app/controllers/pages_controller.php or app/views/pages/home.ctp was present. git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@8187 3807eeeb-6ff5-0310-8944-8be069107fe0 --- cake/tests/cases/dispatcher.test.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/cake/tests/cases/dispatcher.test.php b/cake/tests/cases/dispatcher.test.php index a50037de8..fd0fff3b9 100644 --- a/cake/tests/cases/dispatcher.test.php +++ b/cake/tests/cases/dispatcher.test.php @@ -493,7 +493,7 @@ class DispatcherTest extends CakeTestCase { * @access public * @return void */ - function setUp() { + function startTest() { $this->_get = $_GET; $_GET = array(); $this->_post = $_POST; @@ -512,7 +512,11 @@ class DispatcherTest extends CakeTestCase { $this->_vendorPaths = Configure::read('vendorPaths'); $this->_pluginPaths = Configure::read('pluginPaths'); $this->_viewPaths = Configure::read('viewPaths'); + $this->_controllerPaths = Configure::read('controllerPaths'); $this->_debug = Configure::read('debug'); + + Configure::write('controllerPaths', Configure::corePaths('controller')); + Configure::write('viewPaths', Configure::corePaths('view')); } /** * tearDown method @@ -520,7 +524,7 @@ class DispatcherTest extends CakeTestCase { * @access public * @return void */ - function tearDown() { + function endTest() { $_GET = $this->_get; $_POST = $this->_post; $_FILES = $this->_files; @@ -530,6 +534,7 @@ class DispatcherTest extends CakeTestCase { Configure::write('vendorPaths', $this->_vendorPaths); Configure::write('pluginPaths', $this->_pluginPaths); Configure::write('viewPaths', $this->_viewPaths); + Configure::write('controllerPaths', $this->_controllerPaths); Configure::write('debug', $this->_debug); } /**