diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-06-15 16:35:27 +0200 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-09-14 13:52:52 +0200 |
commit | 13d25e6a327728fc5bc28759ffe9f2248f6cb9a0 (patch) | |
tree | a5635c9b29e3c7279824f40dce878f8093518278 | |
parent | 3f70699aa378cce091c441bb4c06c38866ff10a9 (diff) | |
download | forums-13d25e6a327728fc5bc28759ffe9f2248f6cb9a0.tar forums-13d25e6a327728fc5bc28759ffe9f2248f6cb9a0.tar.gz forums-13d25e6a327728fc5bc28759ffe9f2248f6cb9a0.tar.bz2 forums-13d25e6a327728fc5bc28759ffe9f2248f6cb9a0.tar.xz forums-13d25e6a327728fc5bc28759ffe9f2248f6cb9a0.zip |
[feature/passwords] Fix tests for PHP version < 5.3.7
PHPBB3-11610
-rw-r--r-- | tests/crypto/manager_test.php | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/tests/crypto/manager_test.php b/tests/crypto/manager_test.php index b5957d5f85..eb1a0eeed3 100644 --- a/tests/crypto/manager_test.php +++ b/tests/crypto/manager_test.php @@ -45,12 +45,24 @@ class phpbb_crypto_manager_test extends PHPUnit_Framework_TestCase public function hash_password_data() { - return array( - array('', '2y', 60), - array('crypto.driver.bcrypt_2y', '2y', 60), - array('crypto.driver.bcrypt', '2a', 60), - array('crypto.driver.salted_md5', 'H', 34), - ); + if (version_compare(PHP_VERSION, '5.3.7', '<')) + { + return array( + array('', '2a', 60), + array('crypto.driver.bcrypt_2y', '2a', 60), + array('crypto.driver.bcrypt', '2a', 60), + array('crypto.driver.salted_md5', 'H', 34), + ); + } + else + { + return array( + array('', '2y', 60), + array('crypto.driver.bcrypt_2y', '2y', 60), + array('crypto.driver.bcrypt', '2a', 60), + array('crypto.driver.salted_md5', 'H', 34), + ); + } } /** |