diff options
author | Marc Alexander <admin@m-a-styles.de> | 2019-11-01 14:37:27 +0100 |
---|---|---|
committer | Marc Alexander <admin@m-a-styles.de> | 2019-11-16 16:02:44 +0100 |
commit | a00b8c29204e4517ada908cdc0bc6eacf93d7305 (patch) | |
tree | 451b2213f3c8a8e3874821d4b4f202e7ccb78a79 /tests/auth/provider_db_test.php | |
parent | 9e0c3fc81ec0c3006acc5aa3074cedb98f11e680 (diff) | |
download | forums-a00b8c29204e4517ada908cdc0bc6eacf93d7305.tar forums-a00b8c29204e4517ada908cdc0bc6eacf93d7305.tar.gz forums-a00b8c29204e4517ada908cdc0bc6eacf93d7305.tar.bz2 forums-a00b8c29204e4517ada908cdc0bc6eacf93d7305.tar.xz forums-a00b8c29204e4517ada908cdc0bc6eacf93d7305.zip |
[ticket/12574] Clean up dependencies of db auth provider
PHPBB3-12574
Diffstat (limited to 'tests/auth/provider_db_test.php')
-rw-r--r-- | tests/auth/provider_db_test.php | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auth/provider_db_test.php b/tests/auth/provider_db_test.php index b7d94ed046..2c467518f5 100644 --- a/tests/auth/provider_db_test.php +++ b/tests/auth/provider_db_test.php @@ -52,8 +52,20 @@ class phpbb_auth_provider_db_test extends phpbb_database_test_case $passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers)); $phpbb_container = new phpbb_mock_container_builder(); + $plugins = new \phpbb\di\service_collection($phpbb_container); + $plugins->add('core.captcha.plugins.nogd'); + $phpbb_container->set( + 'captcha.factory', + new \phpbb\captcha\factory($phpbb_container, $plugins) + ); + $phpbb_container->set( + 'core.captcha.plugins.nogd', + new \phpbb\captcha\plugins\nogd() + ); + /** @var \phpbb\captcha\factory $captcha_factory */ + $captcha_factory = $phpbb_container->get('captcha.factory'); - $provider = new \phpbb\auth\provider\db($db, $config, $passwords_manager, $request, $user, $phpbb_container, $phpbb_root_path, $phpEx); + $provider = new \phpbb\auth\provider\db($captcha_factory, $config, $db, $passwords_manager, $request, $user, $phpbb_root_path, $phpEx); if (version_compare(PHP_VERSION, '5.3.7', '<')) { $password_hash = '$2a$10$e01Syh9PbJjUkio66eFuUu4FhCE2nRgG7QPc1JACalsPXcIuG2bbi'; |