aboutsummaryrefslogtreecommitdiffstats
path: root/tests/passwords
diff options
context:
space:
mode:
authorMarc Alexander <admin@m-a-styles.de>2013-10-27 14:18:02 +0100
committerMarc Alexander <admin@m-a-styles.de>2013-10-27 14:18:02 +0100
commit5193b3279cfcd4f7f5d656ec806b87e971c5523f (patch)
tree45bb4f9fd78e8a34e2057593aa4b68de9135e86b /tests/passwords
parent760f148a2ba581df61a25d3efd0e438b5ea77e7b (diff)
downloadforums-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/passwords')
-rw-r--r--tests/passwords/drivers_test.php2
-rw-r--r--tests/passwords/manager_test.php4
2 files changed, 3 insertions, 3 deletions
diff --git a/tests/passwords/drivers_test.php b/tests/passwords/drivers_test.php
index 1fc51b1dd2..fd45c22fc1 100644
--- a/tests/passwords/drivers_test.php
+++ b/tests/passwords/drivers_test.php
@@ -16,8 +16,8 @@ class phpbb_passwords_helper_test extends PHPUnit_Framework_TestCase
$this->driver_helper = new \phpbb\passwords\driver\helper($config);
$this->passwords_drivers = array(
- 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $this->driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $this->driver_helper),
'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $this->driver_helper),
);
diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php
index f68ca25a2f..4ddd8742ae 100644
--- a/tests/passwords/manager_test.php
+++ b/tests/passwords/manager_test.php
@@ -22,8 +22,8 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
$this->driver_helper = new \phpbb\passwords\driver\helper($config);
$this->passwords_drivers = array(
- 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
'passwords.driver.bcrypt_2y' => new \phpbb\passwords\driver\bcrypt_2y($config, $this->driver_helper),
+ 'passwords.driver.bcrypt' => new \phpbb\passwords\driver\bcrypt($config, $this->driver_helper),
'passwords.driver.salted_md5' => new \phpbb\passwords\driver\salted_md5($config, $this->driver_helper),
'passwords.driver.phpass' => new \phpbb\passwords\driver\phpass($config, $this->driver_helper),
);
@@ -35,7 +35,7 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase
$this->helper = new \phpbb\passwords\helper;
// Set up passwords manager
- $this->manager = new \phpbb\passwords\manager($config, $this->passwords_drivers, $this->helper, 'passwords.driver.bcrypt_2y');
+ $this->manager = new \phpbb\passwords\manager($config, $this->passwords_drivers, $this->helper, array_keys($this->passwords_drivers));
}
public function hash_password_data()