diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2009-05-11 14:31:07 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-05-11 14:31:07 +0000 |
commit | 784b3aa34aa3d42b6a56cae3385dce63dfe0e034 (patch) | |
tree | ca0a589df2c54664f89c7e207823d20a474296a5 /core/tests/REST_Controller_Test.php | |
parent | 8b33371e99247735876feebcc48ea5250c1af85e (diff) |
Save and Restore the $_POST variable in tests that manipulate it so
other tests don't fail unexpectedly
Diffstat (limited to 'core/tests/REST_Controller_Test.php')
-rw-r--r-- | core/tests/REST_Controller_Test.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/core/tests/REST_Controller_Test.php b/core/tests/REST_Controller_Test.php index 760af864..af46a72f 100644 --- a/core/tests/REST_Controller_Test.php +++ b/core/tests/REST_Controller_Test.php @@ -19,11 +19,16 @@ */ class REST_Controller_Test extends Unit_Test_Case { public function setup() { + $this->_post = $_POST; $this->mock_controller = new Mock_RESTful_Controller("mock"); $this->mock_not_loaded_controller = new Mock_RESTful_Controller("mock_not_loaded"); $_POST = array(); } + public function teardown() { + $_POST = $this->_post; + } + public function dispatch_index_test() { $_SERVER["REQUEST_METHOD"] = "GET"; $_POST["_method"] = ""; |