mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-06 16:56:44 +02:00
[ticket/12960] Remove broken captchas and prepare for incomplete captcha
PHPBB3-12960
This commit is contained in:
@@ -45,14 +45,14 @@ class phpbb_auth_provider_db_test extends phpbb_database_test_case
|
||||
|
||||
$phpbb_container = new phpbb_mock_container_builder();
|
||||
$plugins = new \phpbb\di\service_collection($phpbb_container);
|
||||
$plugins->add('core.captcha.plugins.nogd');
|
||||
$plugins->add('core.captcha.plugins.qa');
|
||||
$phpbb_container->set(
|
||||
'captcha.factory',
|
||||
new \phpbb\captcha\factory($phpbb_container, $plugins)
|
||||
);
|
||||
$phpbb_container->set(
|
||||
'core.captcha.plugins.nogd',
|
||||
new \phpbb\captcha\plugins\nogd()
|
||||
'core.captcha.plugins.qa',
|
||||
new \phpbb\captcha\plugins\qa('', '', '')
|
||||
);
|
||||
/** @var \phpbb\captcha\factory $captcha_factory */
|
||||
$captcha_factory = $phpbb_container->get('captcha.factory');
|
||||
|
@@ -62,14 +62,14 @@ class phpbb_functions_user_delete_test extends phpbb_database_test_case
|
||||
$passwords_manager = new \phpbb\passwords\manager($config, $passwords_drivers, $passwords_helper, array_keys($passwords_drivers));
|
||||
|
||||
$plugins = new \phpbb\di\service_collection($phpbb_container);
|
||||
$plugins->add('core.captcha.plugins.nogd');
|
||||
$plugins->add('core.captcha.plugins.qa');
|
||||
$phpbb_container->set(
|
||||
'captcha.factory',
|
||||
new \phpbb\captcha\factory($phpbb_container, $plugins)
|
||||
);
|
||||
$phpbb_container->set(
|
||||
'core.captcha.plugins.nogd',
|
||||
new \phpbb\captcha\plugins\nogd()
|
||||
'core.captcha.plugins.qa',
|
||||
new \phpbb\captcha\plugins\qa('', '', '')
|
||||
);
|
||||
// Set up passwords manager
|
||||
$db_auth_provider = new \phpbb\auth\provider\db(
|
||||
|
@@ -30,14 +30,14 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case
|
||||
global $phpbb_container;
|
||||
|
||||
$plugins = new \phpbb\di\service_collection($phpbb_container);
|
||||
$plugins->add('core.captcha.plugins.nogd');
|
||||
$plugins->add('core.captcha.plugins.recaptcha');
|
||||
$phpbb_container->set(
|
||||
'captcha.factory',
|
||||
new \phpbb\captcha\factory($phpbb_container, $plugins)
|
||||
);
|
||||
$phpbb_container->set(
|
||||
'core.captcha.plugins.nogd',
|
||||
new \phpbb\captcha\plugins\nogd()
|
||||
'core.captcha.plugins.recaptcha',
|
||||
new \phpbb\captcha\plugins\recaptcha()
|
||||
);
|
||||
}
|
||||
|
||||
@@ -77,7 +77,7 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case
|
||||
);
|
||||
|
||||
// There is an error unless the captcha plugin is set
|
||||
$config['captcha_plugin'] = 'core.captcha.plugins.nogd';
|
||||
$config['captcha_plugin'] = 'core.captcha.plugins.recaptcha';
|
||||
$this->session->session_gc();
|
||||
$this->check_expired_sessions_recent(
|
||||
[],
|
||||
@@ -132,7 +132,7 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case
|
||||
global $config;
|
||||
$config['session_length'] = 0;
|
||||
// There is an error unless the captcha plugin is set
|
||||
$config['captcha_plugin'] = 'core.captcha.plugins.nogd';
|
||||
$config['captcha_plugin'] = 'core.captcha.plugins.recaptcha';
|
||||
$this->session->session_gc();
|
||||
$this->check_sessions_equals(
|
||||
[],
|
||||
|
Reference in New Issue
Block a user