aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/mock/cache.php5
-rw-r--r--tests/security/hash_test.php21
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/mock/cache.php b/tests/mock/cache.php
index 738d1eaaba..11e525ff79 100644
--- a/tests/mock/cache.php
+++ b/tests/mock/cache.php
@@ -59,7 +59,12 @@ class phpbb_mock_cache
if ($ignore_db_info)
{
+ unset($cache_data['mssqlodbc_version']);
+ unset($cache_data['mssql_version']);
+ unset($cache_data['mysql_version']);
unset($cache_data['mysqli_version']);
+ unset($cache_data['pgsql_version']);
+ unset($cache_data['sqlite_version']);
}
$test->assertEquals($data, $cache_data);
diff --git a/tests/security/hash_test.php b/tests/security/hash_test.php
new file mode 100644
index 0000000000..19a3822145
--- /dev/null
+++ b/tests/security/hash_test.php
@@ -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'));
+ }
+}
+