Skip to content

Commit f983340

Browse files
committed
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
1 parent 7401b0c commit f983340

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

cake/tests/cases/dispatcher.test.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ class DispatcherTest extends CakeTestCase {
493493
* @access public
494494
* @return void
495495
*/
496-
function setUp() {
496+
function startTest() {
497497
$this->_get = $_GET;
498498
$_GET = array();
499499
$this->_post = $_POST;
@@ -512,15 +512,19 @@ function setUp() {
512512
$this->_vendorPaths = Configure::read('vendorPaths');
513513
$this->_pluginPaths = Configure::read('pluginPaths');
514514
$this->_viewPaths = Configure::read('viewPaths');
515+
$this->_controllerPaths = Configure::read('controllerPaths');
515516
$this->_debug = Configure::read('debug');
517+
518+
Configure::write('controllerPaths', Configure::corePaths('controller'));
519+
Configure::write('viewPaths', Configure::corePaths('view'));
516520
}
517521
/**
518522
* tearDown method
519523
*
520524
* @access public
521525
* @return void
522526
*/
523-
function tearDown() {
527+
function endTest() {
524528
$_GET = $this->_get;
525529
$_POST = $this->_post;
526530
$_FILES = $this->_files;
@@ -530,6 +534,7 @@ function tearDown() {
530534
Configure::write('vendorPaths', $this->_vendorPaths);
531535
Configure::write('pluginPaths', $this->_pluginPaths);
532536
Configure::write('viewPaths', $this->_viewPaths);
537+
Configure::write('controllerPaths', $this->_controllerPaths);
533538
Configure::write('debug', $this->_debug);
534539
}
535540
/**

0 commit comments

Comments
 (0)