aboutsummaryrefslogtreecommitdiffstats
path: root/tests/security/hash_test.php
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-10-03 10:23:17 +0200
committerMarc Alexander <admin@m-a-styles.de>2013-10-03 10:23:17 +0200
commit035db5e08b961055f0e74a26491ac35b289469cd (patch)
tree865c15c296163e827791fdee5c3da504d8c8a82e /tests/security/hash_test.php
parent7006db7a2dd68ec7f7ca3a24d9afa656056f9d8c (diff)
downloadforums-035db5e08b961055f0e74a26491ac35b289469cd.tar
forums-035db5e08b961055f0e74a26491ac35b289469cd.tar.gz
forums-035db5e08b961055f0e74a26491ac35b289469cd.tar.bz2
forums-035db5e08b961055f0e74a26491ac35b289469cd.tar.xz
forums-035db5e08b961055f0e74a26491ac35b289469cd.zip
[feature/passwords] Fix hash_test for use of passwords manager
PHPBB3-11610
Diffstat (limited to 'tests/security/hash_test.php')
-rw-r--r--tests/security/hash_test.php5
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php
index f7d2c0dad8..c1a8c206a8 100644
--- a/tests/security/hash_test.php
+++ b/tests/security/hash_test.php
@@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
class phpbb_security_hash_test extends phpbb_test_case
{
- public function test_check_hash_with_phpass()
+ public function setUp()
{
global $phpbb_container;
@@ -39,7 +39,10 @@ class phpbb_security_hash_test extends phpbb_test_case
->method('get')
->with('passwords.manager')
->will($this->returnValue($passwords_manager));
+ }
+ public function test_check_hash_with_phpass()
+ {
$this->assertTrue(phpbb_check_hash('test', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
$this->assertTrue(phpbb_check_hash('test', '$P$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
$this->assertFalse(phpbb_check_hash('foo', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));