diff options
Diffstat (limited to 'tests/session/garbage_collection_test.php')
-rw-r--r-- | tests/session/garbage_collection_test.php | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/tests/session/garbage_collection_test.php b/tests/session/garbage_collection_test.php index e7d01785dd..3fad81c68b 100644 --- a/tests/session/garbage_collection_test.php +++ b/tests/session/garbage_collection_test.php @@ -1,13 +1,18 @@ <?php /** - * - * @package testing - * @copyright (c) 2013 phpBB Group - * @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 - * - */ +* +* This file is part of the phpBB Forum Software package. +* +* @copyright (c) phpBB Limited <https://www.phpbb.com> +* @license GNU General Public License, version 2 (GPL-2.0) +* +* For full copyright and license information, please see +* the docs/CREDITS.txt file. +* +*/ require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php'; +require_once dirname(__FILE__) . '/../../phpBB/includes/functions.php'; class phpbb_session_garbage_collection_test extends phpbb_session_test_case { @@ -22,6 +27,19 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case { parent::setUp(); $this->session = $this->session_factory->get_session($this->db); + + global $phpbb_container; + + $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() + ); } public function test_cleanup_all() @@ -43,7 +61,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'] = 'phpbb_captcha_nogd'; + $config['captcha_plugin'] = 'core.captcha.plugins.nogd'; $this->session->session_gc(); $this->check_sessions_equals( array(), |