diff options
author | Andrey Andreev <narf@bofh.bg> | 2012-06-09 22:16:58 +0200 |
---|---|---|
committer | Andrey Andreev <narf@bofh.bg> | 2012-06-09 22:16:58 +0200 |
commit | c186288755aba46a2b6f0c3f104d9a6ce6b11a7f (patch) | |
tree | 1858ae3cb82693e30e2682b2d6e24aecfd959ff7 /tests/codeigniter/core/Input_test.php | |
parent | 99b782d8a3d92c4703a059cbd62e2f1e6fea689c (diff) |
Cleanup/optimize tests/codeigniter/
Diffstat (limited to 'tests/codeigniter/core/Input_test.php')
-rw-r--r-- | tests/codeigniter/core/Input_test.php | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/tests/codeigniter/core/Input_test.php b/tests/codeigniter/core/Input_test.php index c9322c027..fe8738832 100644 --- a/tests/codeigniter/core/Input_test.php +++ b/tests/codeigniter/core/Input_test.php @@ -1,7 +1,7 @@ <?php class Input_test extends CI_TestCase { - + public function set_up() { // Set server variable to GET as default, since this will leave unset in STDIN env @@ -17,9 +17,9 @@ class Input_test extends CI_TestCase { $this->input = new Mock_Core_Input($security, $utf8); } - + // -------------------------------------------------------------------- - + public function test_get_not_exists() { $this->assertEmpty($this->input->get()); @@ -38,7 +38,7 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_get_exist() { $_SERVER['REQUEST_METHOD'] = 'GET'; @@ -49,7 +49,7 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_get_exist_with_xss_clean() { $_SERVER['REQUEST_METHOD'] = 'GET'; @@ -61,7 +61,7 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_post_not_exists() { $this->assertEmpty($this->input->post()); @@ -78,7 +78,7 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_post_exist() { $_SERVER['REQUEST_METHOD'] = 'POST'; @@ -89,7 +89,7 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_post_exist_with_xss_clean() { $_SERVER['REQUEST_METHOD'] = 'POST'; @@ -101,7 +101,7 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_get_post() { $_SERVER['REQUEST_METHOD'] = 'POST'; @@ -111,7 +111,7 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_cookie() { $_COOKIE['foo'] = 'bar'; @@ -120,14 +120,14 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_server() { $this->assertEquals('GET', $this->input->server('REQUEST_METHOD')); } // -------------------------------------------------------------------- - + public function test_fetch_from_array() { $data = array( @@ -145,14 +145,14 @@ class Input_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_valid_ip() { $ip_v4 = '192.18.0.1'; $this->assertTrue($this->input->valid_ip($ip_v4)); $ip_v6 = array('2001:0db8:0000:85a3:0000:0000:ac1f:8001', '2001:db8:0:85a3:0:0:ac1f:8001', '2001:db8:0:85a3::ac1f:8001'); - foreach($ip_v6 as $ip) + foreach ($ip_v6 as $ip) { $this->assertTrue($this->input->valid_ip($ip)); } |