mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 20:38:52 +00:00
[feature/passwords] Fix hash_test for use of passwords manager
PHPBB3-11610
This commit is contained in:
parent
7006db7a2d
commit
035db5e08b
1 changed files with 4 additions and 1 deletions
|
@ -11,7 +11,7 @@ require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
|
||||||
|
|
||||||
class phpbb_security_hash_test extends phpbb_test_case
|
class phpbb_security_hash_test extends phpbb_test_case
|
||||||
{
|
{
|
||||||
public function test_check_hash_with_phpass()
|
public function setUp()
|
||||||
{
|
{
|
||||||
global $phpbb_container;
|
global $phpbb_container;
|
||||||
|
|
||||||
|
@ -39,7 +39,10 @@ class phpbb_security_hash_test extends phpbb_test_case
|
||||||
->method('get')
|
->method('get')
|
||||||
->with('passwords.manager')
|
->with('passwords.manager')
|
||||||
->will($this->returnValue($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', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
|
||||||
$this->assertTrue(phpbb_check_hash('test', '$P$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
|
$this->assertTrue(phpbb_check_hash('test', '$P$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
|
||||||
$this->assertFalse(phpbb_check_hash('foo', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
|
$this->assertFalse(phpbb_check_hash('foo', '$H$9isfrtKXWqrz8PvztXlL3.daw4U0zI1'));
|
||||||
|
|
Loading…
Add table
Reference in a new issue