summaryrefslogtreecommitdiffstats
path: root/tests/codeigniter/helpers/security_helper_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/codeigniter/helpers/security_helper_test.php')
-rw-r--r--tests/codeigniter/helpers/security_helper_test.php28
1 files changed, 2 insertions, 26 deletions
diff --git a/tests/codeigniter/helpers/security_helper_test.php b/tests/codeigniter/helpers/security_helper_test.php
index effd3ec02..d7e3f4734 100644
--- a/tests/codeigniter/helpers/security_helper_test.php
+++ b/tests/codeigniter/helpers/security_helper_test.php
@@ -6,7 +6,7 @@ class Security_helper_tests extends CI_TestCase {
{
$this->helper('security');
$obj = new stdClass;
- $obj->security = new Mock_Core_Security();
+ $obj->security = new Mock_Core_Security('UTF-8');
$this->ci_instance($obj);
}
@@ -25,30 +25,6 @@ class Security_helper_tests extends CI_TestCase {
$this->assertEquals('foo', sanitize_filename($filename));
}
- function test_do_hash()
- {
- $md5 = md5('foo');
- $sha1 = sha1('foo');
-
- $algos = hash_algos();
- $algo_results = array();
- foreach ($algos as $k => $v)
- {
- $algo_results[$v] = hash($v, 'foo');
- }
-
- $this->assertEquals($sha1, do_hash('foo'));
- $this->assertEquals($sha1, do_hash('foo', 'sha1'));
- $this->assertEquals($md5, do_hash('foo', 'md5'));
- $this->assertEquals($md5, do_hash('foo', 'foobar'));
-
- // Test each algorithm available to PHP
- foreach ($algo_results as $algo => $result)
- {
- $this->assertEquals($result, do_hash('foo', $algo));
- }
- }
-
function test_strip_image_tags()
{
$this->assertEquals('http://example.com/spacer.gif', strip_image_tags('http://example.com/spacer.gif'));
@@ -61,4 +37,4 @@ class Security_helper_tests extends CI_TestCase {
$this->assertEquals('&lt;? echo $foo; ?&gt;', encode_php_tags('<? echo $foo; ?>'));
}
-} \ No newline at end of file
+}