diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/crypto/manager_test.php | 56 |
1 files changed, 38 insertions, 18 deletions
diff --git a/tests/crypto/manager_test.php b/tests/crypto/manager_test.php index 9b14383f5d..f2eb9a160b 100644 --- a/tests/crypto/manager_test.php +++ b/tests/crypto/manager_test.php @@ -128,24 +128,44 @@ class phpbb_crypto_manager_test extends PHPUnit_Framework_TestCase public function test_combined_hash_data() { - return array( - array( - 'crypto.driver.salted_md5', - array('crypto.driver.bcrypt_2y'), - ), - array( - 'crypto.driver.salted_md5', - array('crypto.driver.bcrypt'), - ), - array( - 'crypto.driver.phpass', - array('crypto.driver.salted_md5'), - ), - array( - 'crypto.driver.salted_md5', - array('crypto.driver.bcrypt_2y', 'crypto.driver.bcrypt'), - ), - ); + if (version_compare(PHP_VERSION, '5.3.7', '<')) + { + return array( + array( + 'crypto.driver.salted_md5', + array('crypto.driver.bcrypt'), + ), + array( + 'crypto.driver.phpass', + array('crypto.driver.salted_md5'), + ), + array( + 'crypto.driver.salted_md5', + array('crypto.driver.phpass', 'crypto.driver.bcrypt'), + ), + ); + } + else + { + return array( + array( + 'crypto.driver.salted_md5', + array('crypto.driver.bcrypt_2y'), + ), + array( + 'crypto.driver.salted_md5', + array('crypto.driver.bcrypt'), + ), + array( + 'crypto.driver.phpass', + array('crypto.driver.salted_md5'), + ), + array( + 'crypto.driver.salted_md5', + array('crypto.driver.bcrypt_2y', 'crypto.driver.bcrypt'), + ), + ); + } } /** |