diff options
author | Marc Alexander <admin@m-a-styles.de> | 2013-10-27 14:18:02 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2013-10-27 14:18:02 +0100 |
commit | 5193b3279cfcd4f7f5d656ec806b87e971c5523f (patch) | |
tree | 45bb4f9fd78e8a34e2057593aa4b68de9135e86b /tests/auth | |
parent | 760f148a2ba581df61a25d3efd0e438b5ea77e7b (diff) | |
download | forums-5193b3279cfcd4f7f5d656ec806b87e971c5523f.tar forums-5193b3279cfcd4f7f5d656ec806b87e971c5523f.tar.gz forums-5193b3279cfcd4f7f5d656ec806b87e971c5523f.tar.bz2 forums-5193b3279cfcd4f7f5d656ec806b87e971c5523f.tar.xz forums-5193b3279cfcd4f7f5d656ec806b87e971c5523f.zip |
[feature/passwords] Pass list of default types to passwords manager
This list is in the order of how the driver types would be used. If a driver
is not supported we will try the subsequent one.
PHPBB3-11610
Diffstat (limited to 'tests/auth')
-rw-r--r-- | tests/auth/provider_apache_test.php | 4 | ||||
-rw-r--r-- | tests/auth/provider_db_test.php | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/auth/provider_apache_test.php b/tests/auth/provider_apache_test.php index 34da8e1dab..b4322922b8 100644 --- a/tests/auth/provider_apache_test.php +++ b/tests/auth/provider_apache_test.php @@ -27,8 +27,8 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case $this->user = $this->getMock('\phpbb\user'); $driver_helper = new \phpbb\passwords\driver\helper($config); $passwords_drivers = array( - 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper), 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper), + 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper), 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper), 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper), ); @@ -40,7 +40,7 @@ class phpbb_auth_provider_apache_test extends phpbb_database_test_case $passwords_helper = new \phpbb\passwords\helper; // Set up passwords manager - $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y'); + $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers)); if (version_compare(PHP_VERSION, '5.3.7', '<')) { diff --git a/tests/auth/provider_db_test.php b/tests/auth/provider_db_test.php index c46d115da8..32c2a82710 100644 --- a/tests/auth/provider_db_test.php +++ b/tests/auth/provider_db_test.php @@ -37,8 +37,8 @@ class phpbb_auth_provider_db_test extends phpbb_database_test_case $user = $this->getMock('\phpbb\user'); $driver_helper = new \phpbb\passwords\driver\helper($config); $passwords_drivers = array( - 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper), 'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $driver_helper), + 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $driver_helper), 'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $driver_helper), 'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $driver_helper), ); @@ -50,7 +50,7 @@ class phpbb_auth_provider_db_test extends phpbb_database_test_case $passwords_helper = new \phpbb\passwords\helper; // Set up passwords manager - $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, 'passwords.driver.bcrypt_2y'); + $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers)); $provider = new \phpbb\auth\provider\db($db, $config, $passwords_manager, $request, $user, $phpbb_root_path, $phpEx); if (version_compare(PHP_VERSION, '5.3.7', '<')) |