diff options
author | Andrey Andreev <narf@devilix.net> | 2016-12-01 14:12:35 +0100 |
---|---|---|
committer | Andrey Andreev <narf@devilix.net> | 2016-12-01 14:12:35 +0100 |
commit | 0c84ef9a33d18d758e36447fd18a240a458ae2bc (patch) | |
tree | eadf541f24b57b21af61ba910e51460914c84c33 /tests/codeigniter/helpers/security_helper_test.php | |
parent | ecc9a5f2102d8221f9783fd77d8a4b7bb03a3e4a (diff) |
Remove previously deprecated Security Helper function do_hash()
Diffstat (limited to 'tests/codeigniter/helpers/security_helper_test.php')
-rw-r--r-- | tests/codeigniter/helpers/security_helper_test.php | 26 |
1 files changed, 1 insertions, 25 deletions
diff --git a/tests/codeigniter/helpers/security_helper_test.php b/tests/codeigniter/helpers/security_helper_test.php index effd3ec02..ab05d57ba 100644 --- a/tests/codeigniter/helpers/security_helper_test.php +++ b/tests/codeigniter/helpers/security_helper_test.php @@ -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('<? echo $foo; ?>', encode_php_tags('<? echo $foo; ?>')); } -}
\ No newline at end of file +} |