Skip to content
This repository
Browse code

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
Mark Story authored June 03, 2009

Showing 1 changed file with 7 additions and 2 deletions. Show diff stats Hide diff stats

  1. 9  cake/tests/cases/dispatcher.test.php
9  cake/tests/cases/dispatcher.test.php
@@ -493,7 +493,7 @@ class DispatcherTest extends CakeTestCase {
493 493
  * @access public
494 494
  * @return void
495 495
  */
496  
-	function setUp() {
  496
+	function startTest() {
497 497
 		$this->_get = $_GET;
498 498
 		$_GET = array();
499 499
 		$this->_post = $_POST;
@@ -512,7 +512,11 @@ function setUp() {
512 512
 		$this->_vendorPaths = Configure::read('vendorPaths');
513 513
 		$this->_pluginPaths = Configure::read('pluginPaths');
514 514
 		$this->_viewPaths = Configure::read('viewPaths');
  515
+		$this->_controllerPaths = Configure::read('controllerPaths');
515 516
 		$this->_debug = Configure::read('debug');
  517
+
  518
+		Configure::write('controllerPaths',  Configure::corePaths('controller'));
  519
+		Configure::write('viewPaths',  Configure::corePaths('view'));
516 520
 	}
517 521
 /**
518 522
  * tearDown method
@@ -520,7 +524,7 @@ function setUp() {
520 524
  * @access public
521 525
  * @return void
522 526
  */
523  
-	function tearDown() {
  527
+	function endTest() {
524 528
 		$_GET = $this->_get;
525 529
 		$_POST = $this->_post;
526 530
 		$_FILES = $this->_files;
@@ -530,6 +534,7 @@ function tearDown() {
530 534
 		Configure::write('vendorPaths', $this->_vendorPaths);
531 535
 		Configure::write('pluginPaths', $this->_pluginPaths);
532 536
 		Configure::write('viewPaths', $this->_viewPaths);
  537
+		Configure::write('controllerPaths', $this->_controllerPaths);
533 538
 		Configure::write('debug', $this->_debug);
534 539
 	}
535 540
 /**

0 notes on commit f983340

Please sign in to comment.
Something went wrong with that request. Please try again.