mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 11:28:25 +00:00
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
This commit is contained in:
parent
7401b0c70f
commit
f983340d21
1 changed files with 7 additions and 2 deletions
|
@ -493,7 +493,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function setUp() {
|
function startTest() {
|
||||||
$this->_get = $_GET;
|
$this->_get = $_GET;
|
||||||
$_GET = array();
|
$_GET = array();
|
||||||
$this->_post = $_POST;
|
$this->_post = $_POST;
|
||||||
|
@ -512,7 +512,11 @@ class DispatcherTest extends CakeTestCase {
|
||||||
$this->_vendorPaths = Configure::read('vendorPaths');
|
$this->_vendorPaths = Configure::read('vendorPaths');
|
||||||
$this->_pluginPaths = Configure::read('pluginPaths');
|
$this->_pluginPaths = Configure::read('pluginPaths');
|
||||||
$this->_viewPaths = Configure::read('viewPaths');
|
$this->_viewPaths = Configure::read('viewPaths');
|
||||||
|
$this->_controllerPaths = Configure::read('controllerPaths');
|
||||||
$this->_debug = Configure::read('debug');
|
$this->_debug = Configure::read('debug');
|
||||||
|
|
||||||
|
Configure::write('controllerPaths', Configure::corePaths('controller'));
|
||||||
|
Configure::write('viewPaths', Configure::corePaths('view'));
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* tearDown method
|
* tearDown method
|
||||||
|
@ -520,7 +524,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
* @access public
|
* @access public
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function tearDown() {
|
function endTest() {
|
||||||
$_GET = $this->_get;
|
$_GET = $this->_get;
|
||||||
$_POST = $this->_post;
|
$_POST = $this->_post;
|
||||||
$_FILES = $this->_files;
|
$_FILES = $this->_files;
|
||||||
|
@ -530,6 +534,7 @@ class DispatcherTest extends CakeTestCase {
|
||||||
Configure::write('vendorPaths', $this->_vendorPaths);
|
Configure::write('vendorPaths', $this->_vendorPaths);
|
||||||
Configure::write('pluginPaths', $this->_pluginPaths);
|
Configure::write('pluginPaths', $this->_pluginPaths);
|
||||||
Configure::write('viewPaths', $this->_viewPaths);
|
Configure::write('viewPaths', $this->_viewPaths);
|
||||||
|
Configure::write('controllerPaths', $this->_controllerPaths);
|
||||||
Configure::write('debug', $this->_debug);
|
Configure::write('debug', $this->_debug);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in a new issue