summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter
diff options
context:
space:
mode:
authorAndrey Andreev <narf@devilix.net>2013-08-12 05:42:25 +0200
committerAndrey Andreev <narf@devilix.net>2013-08-12 05:42:25 +0200
commit756eaf6245a9c2a8a9f01b3b3d9fcd255bd64d25 (patch)
tree6f748f3139c67c4db07e023b8a4ed2eca7e4502a /tests/codeigniter
parente23ba1373b347ecca61c371c96f0e33da443e915 (diff)
parente8e56d7be01177b3f6c2be5a3c43d21e4a472558 (diff)
Merge pull request #2598 from vlakoff/develop
Input class: change behavior of get_post() method, add post_get() method
Diffstat (limited to 'tests/codeigniter')
-rw-r--r--tests/codeigniter/core/Input_test.php12
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'));
}