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/Photos_Controller_Test.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'core/tests/Photos_Controller_Test.php') diff --git a/core/tests/Photos_Controller_Test.php b/core/tests/Photos_Controller_Test.php index 2b28f774..b40a9677 100644 --- a/core/tests/Photos_Controller_Test.php +++ b/core/tests/Photos_Controller_Test.php @@ -18,8 +18,12 @@ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ class Photos_Controller_Test extends Unit_Test_Case { + public function setup() { + $this->_post = $_POST; + } + public function teardown() { - unset($_POST); + $_POST = $this->_post; } public function change_photo_test() { -- cgit v1.2.3