mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2024-11-15 03:18:26 +00:00
Fixing options[data] always writing its data into $_POST['data'].
It now just overwrites $_POST. Fixes #1917
This commit is contained in:
parent
0091fac5b9
commit
70f47378f9
2 changed files with 2 additions and 7 deletions
|
@ -98,11 +98,6 @@ class ControllerTestCaseTestController extends AppController {
|
|||
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to get a testable concrete class of the test subject
|
||||
*/
|
||||
class TestingControllerTestCase extends ControllerTestCase {}
|
||||
|
||||
/**
|
||||
* ControllerTestCaseTest
|
||||
*
|
||||
|
@ -132,7 +127,7 @@ class ControllerTestCaseTest extends CakeTestCase {
|
|||
'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 @@ abstract class ControllerTestCase extends CakeTestCase {
|
|||
$_GET = $options['data'];
|
||||
$_POST = array();
|
||||
} else {
|
||||
$_POST = array('data' => $options['data']);
|
||||
$_POST = $options['data'];
|
||||
$_GET = array();
|
||||
}
|
||||
$request = new CakeRequest($url);
|
||||
|
|
Loading…
Reference in a new issue