Permalink
Browse files

Fixing options[data] always writing its data into $_POST['data'].

It now just overwrites $_POST.
Fixes #1917
  • Loading branch information...
1 parent 0091fac commit 70f47378f9ac53fb6572e8735dfb51090801bf28 @markstory markstory committed Aug 20, 2011
@@ -99,11 +99,6 @@ class ControllerTestCaseTestController extends AppController {
}
/**
- * Used to get a testable concrete class of the test subject
- */
-class TestingControllerTestCase extends ControllerTestCase {}
-
-/**
* ControllerTestCaseTest
*
* @package Cake.Test.Case.TestSuite
@@ -132,7 +127,7 @@ public function setUp() {
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
));
CakePlugin::loadAll();
- $this->Case = new TestingControllerTestCase();
+ $this->Case = $this->getMockForAbstractClass('ControllerTestCase');
Router::reload();
}
@@ -194,7 +194,7 @@ private function _testAction($url = '', $options = array()) {
$_GET = $options['data'];
$_POST = array();
} else {
- $_POST = array('data' => $options['data']);
+ $_POST = $options['data'];
$_GET = array();
}
$request = new CakeRequest($url);

0 comments on commit 70f4737

Please sign in to comment.