Skip to content

Commit

Permalink
Fixing options[data] always writing its data into $_POST['data'].
Browse files Browse the repository at this point in the history
It now just overwrites $_POST.
Fixes #1917
  • Loading branch information
markstory committed Aug 20, 2011
1 parent 0091fac commit 70f4737
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
7 changes: 1 addition & 6 deletions lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php
Expand Up @@ -98,11 +98,6 @@ class ControllerTestCaseTestController extends AppController {


} }


/**
* Used to get a testable concrete class of the test subject
*/
class TestingControllerTestCase extends ControllerTestCase {}

/** /**
* ControllerTestCaseTest * ControllerTestCaseTest
* *
Expand Down Expand Up @@ -132,7 +127,7 @@ public function setUp() {
'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS) 'View' => array(CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS)
)); ));
CakePlugin::loadAll(); CakePlugin::loadAll();
$this->Case = new TestingControllerTestCase(); $this->Case = $this->getMockForAbstractClass('ControllerTestCase');
Router::reload(); Router::reload();
} }


Expand Down
2 changes: 1 addition & 1 deletion lib/Cake/TestSuite/ControllerTestCase.php
Expand Up @@ -194,7 +194,7 @@ private function _testAction($url = '', $options = array()) {
$_GET = $options['data']; $_GET = $options['data'];
$_POST = array(); $_POST = array();
} else { } else {
$_POST = array('data' => $options['data']); $_POST = $options['data'];
$_GET = array(); $_GET = array();
} }
$request = new CakeRequest($url); $request = new CakeRequest($url);
Expand Down

0 comments on commit 70f4737

Please sign in to comment.