From 784b3aa34aa3d42b6a56cae3385dce63dfe0e034 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Mon, 11 May 2009 14:31:07 +0000 Subject: Save and Restore the $_POST variable in tests that manipulate it so other tests don't fail unexpectedly --- core/tests/REST_Helper_Test.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'core/tests/REST_Helper_Test.php') diff --git a/core/tests/REST_Helper_Test.php b/core/tests/REST_Helper_Test.php index 27828d89..e5ef645b 100644 --- a/core/tests/REST_Helper_Test.php +++ b/core/tests/REST_Helper_Test.php @@ -18,6 +18,14 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class REST_Helper_Test extends Unit_Test_Case { + public function setup() { + $this->_post = $_POST; + } + + public function teardown() { + $_POST = $this->_post; + } + public function request_method_test() { foreach (array("GET", "POST") as $method) { foreach (array("", "PUT", "DELETE") as $tunnel) { -- cgit v1.2.3