mirror of
https://github.com/phpbb/phpbb.git
synced 2025-02-24 03:54:10 +01:00
[feature/passwords] Fix tests on PHP versions < 5.3.7
PHPBB3-11610
This commit is contained in:
parent
cfbd858bd7
commit
ddc207fae8
@ -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'),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user