1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-17 15:11:40 +02:00

[ticket/10101] Add test case for native phpass hashes

PHPBB3-10101
This commit is contained in:
Igor Wiedler
2011-03-20 22:52:31 +01:00
parent f8384b7302
commit 4c3cc152c8

View File

@@ -0,0 +1,21 @@
<?php
/**
*
* @package testing
* @copyright (c) 2011 phpBB Group
* @license http://opensource.org/licenses/gpl-license.php GNU Public License
*
*/
require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php';
class phpbb_security_hash_test extends phpbb_test_case
{
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'));
}
}