diff options
author | vlakoff <vlakoff@gmail.com> | 2013-08-11 20:36:41 +0200 |
---|---|---|
committer | vlakoff <vlakoff@gmail.com> | 2013-08-11 20:38:16 +0200 |
commit | 441fd264267ac526730d06183bd3cfebfd26df01 (patch) | |
tree | a0cfb34851bf03221583e7b535db82898c077dbd /tests/codeigniter | |
parent | e23ba1373b347ecca61c371c96f0e33da443e915 (diff) |
Input class: change behavior of get_post() method, add post_get() method
followup to PR #2522
Diffstat (limited to 'tests/codeigniter')
-rw-r--r-- | tests/codeigniter/core/Input_test.php | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php index 5cf25fefa..0a98e556c 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -82,11 +82,21 @@ class Input_test extends CI_TestCase { // -------------------------------------------------------------------- - public function test_get_post() + public function test_post_get() { $_SERVER['REQUEST_METHOD'] = 'POST'; $_POST['foo'] = 'bar'; + $this->assertEquals('bar', $this->input->post_get('foo')); + } + + // -------------------------------------------------------------------- + + public function test_get_post() + { + $_SERVER['REQUEST_METHOD'] = 'GET'; + $_GET['foo'] = 'bar'; + $this->assertEquals('bar', $this->input->get_post('foo')); } |