From 01512104b5823d15eed64d362b41b9594f870f0c Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 22 Sep 2013 22:53:10 +0200 Subject: [feature/passwords] Use dependency injection for passwords driver helper The passwords driver helper is now injected into the driver base instead of being manually loaded. PHPBB3-11610 --- tests/passwords/manager_test.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'tests/passwords/manager_test.php') diff --git a/tests/passwords/manager_test.php b/tests/passwords/manager_test.php index c695735aa6..d06e09a014 100644 --- a/tests/passwords/manager_test.php +++ b/tests/passwords/manager_test.php @@ -26,12 +26,13 @@ class phpbb_passwords_manager_test extends PHPUnit_Framework_TestCase // Prepare dependencies for manager and driver $config = new phpbb_config(array()); + $driver_helper = new phpbb_passwords_driver_helper; $this->passwords_drivers = array( - 'passwords.driver.bcrypt' => new phpbb_passwords_driver_bcrypt($config), - 'passwords.driver.bcrypt_2y' => new phpbb_passwords_driver_bcrypt_2y($config), - 'passwords.driver.salted_md5' => new phpbb_passwords_driver_salted_md5($config), - 'passwords.driver.phpass' => new phpbb_passwords_driver_phpass($config), + '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.salted_md5' => new phpbb_passwords_driver_salted_md5($config, $driver_helper), + 'passwords.driver.phpass' => new phpbb_passwords_driver_phpass($config, $driver_helper), ); foreach ($this->passwords_drivers as $key => $driver) -- cgit v1.2.1