Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit f983340d217d604f42ef07c1bb2f3502468c653e 1 parent 7401b0c
@markstory markstory authored
Showing with 7 additions and 2 deletions.
  1. +7 −2 cake/tests/cases/dispatcher.test.php
View
9 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 @@ function setUp() {
$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 @@ function setUp() {
* @access public
* @return void
*/
- function tearDown() {
+ function endTest() {
$_GET = $this->_get;
$_POST = $this->_post;
$_FILES = $this->_files;
@@ -530,6 +534,7 @@ function tearDown() {
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);
}
/**
Please sign in to comment.
Something went wrong with that request. Please try again.