From 70f47378f9ac53fb6572e8735dfb51090801bf28 Mon Sep 17 00:00:00 2001 From: Mark Story Date: Sat, 20 Aug 2011 09:46:01 -0400 Subject: [PATCH] Fixing options[data] always writing its data into $_POST['data']. It now just overwrites $_POST. Fixes #1917 --- lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php | 7 +------ lib/Cake/TestSuite/ControllerTestCase.php | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php index 0340e8f20..2831c533e 100644 --- a/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php +++ b/lib/Cake/Test/Case/TestSuite/ControllerTestCaseTest.php @@ -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(); } diff --git a/lib/Cake/TestSuite/ControllerTestCase.php b/lib/Cake/TestSuite/ControllerTestCase.php index 37a9cb221..ee3bea15a 100644 --- a/lib/Cake/TestSuite/ControllerTestCase.php +++ b/lib/Cake/TestSuite/ControllerTestCase.php @@ -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);