From c186288755aba46a2b6f0c3f104d9a6ce6b11a7f Mon Sep 17 00:00:00 2001 From: Andrey Andreev Date: Sat, 9 Jun 2012 23:16:58 +0300 Subject: Cleanup/optimize tests/codeigniter/ --- tests/codeigniter/core/Security_test.php | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'tests/codeigniter/core/Security_test.php') diff --git a/tests/codeigniter/core/Security_test.php b/tests/codeigniter/core/Security_test.php index b2f8c69d2..3f6e3b07a 100644 --- a/tests/codeigniter/core/Security_test.php +++ b/tests/codeigniter/core/Security_test.php @@ -1,7 +1,7 @@ security = new Mock_Core_Security(); } - + // -------------------------------------------------------------------- - + public function test_csrf_verify() { $_SERVER['REQUEST_METHOD'] = 'GET'; @@ -25,7 +25,7 @@ class Security_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_csrf_verify_invalid() { // Without issuing $_POST[csrf_token_name], this request will triggering CSRF error @@ -37,7 +37,7 @@ class Security_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_csrf_verify_valid() { $_SERVER['REQUEST_METHOD'] = 'POST'; @@ -47,21 +47,21 @@ class Security_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_get_csrf_hash() { $this->assertEquals($this->security->csrf_hash, $this->security->get_csrf_hash()); } // -------------------------------------------------------------------- - + public function test_get_csrf_token_name() { $this->assertEquals('ci_csrf_token', $this->security->get_csrf_token_name()); } // -------------------------------------------------------------------- - + public function test_xss_clean() { $harm_string = "Hello, i try to your site"; @@ -72,7 +72,7 @@ class Security_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_xss_hash() { $this->assertEmpty($this->security->xss_hash); @@ -84,7 +84,7 @@ class Security_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_entity_decode() { $encoded = '<div>Hello <b>Booya</b></div>'; @@ -94,7 +94,7 @@ class Security_test extends CI_TestCase { } // -------------------------------------------------------------------- - + public function test_sanitize_filename() { $filename = './'; @@ -102,4 +102,5 @@ class Security_test extends CI_TestCase { $this->assertEquals('foo', $safe_filename); } + } \ No newline at end of file -- cgit v1.2.3-24-g4f1b