aboutsummaryrefslogtreecommitdiffstats
path: root/tests/functions/user_delete_test.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/functions/user_delete_test.php')
-rw-r--r--tests/functions/user_delete_test.php38
1 files changed, 30 insertions, 8 deletions
diff --git a/tests/functions/user_delete_test.php b/tests/functions/user_delete_test.php
index f419c90e9e..f4ea5696b9 100644
--- a/tests/functions/user_delete_test.php
+++ b/tests/functions/user_delete_test.php
@@ -23,7 +23,7 @@ class phpbb_functions_user_delete_test extends phpbb_database_test_case
return $this->createXMLDataSet(dirname(__FILE__) . '/fixtures/user_delete.xml');
}
- protected function setUp()
+ protected function setUp(): void
{
parent::setUp();
@@ -60,21 +60,43 @@ class phpbb_functions_user_delete_test extends phpbb_database_test_case
// Set up passwords manager
$passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers));
- $oauth_provider = new \phpbb\auth\provider\oauth\oauth(
- $db,
+ $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()
+ );
+ // Set up passwords manager
+ $db_auth_provider = new \phpbb\auth\provider\db(
+ new \phpbb\captcha\factory($phpbb_container, $plugins),
$config,
+ $db,
$passwords_manager,
$request,
$user,
+ $phpbb_root_path,
+ $phpEx
+ );
+
+ $oauth_provider = new \phpbb\auth\provider\oauth\oauth(
+ $config,
+ $db,
+ $db_auth_provider,
+ $phpbb_dispatcher,
+ $lang,
+ $request,
+ $oauth_provider_collection,
+ $user,
'phpbb_oauth_tokens',
'phpbb_oauth_states',
'phpbb_oauth_accounts',
- $oauth_provider_collection,
'phpbb_users',
- $phpbb_container,
- $phpbb_dispatcher,
- $this->phpbb_root_path,
- $this->php_ext
+ $phpbb_root_path,
+ $phpEx
);
$provider_collection->offsetSet('auth.provider.oauth', $oauth_provider);