mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-27 21:58:52 +00:00
[ticket/11854] Update unit tests
PHPBB3-11854
This commit is contained in:
parent
6e4991093a
commit
28cf0ef832
1 changed files with 15 additions and 1 deletions
|
@ -12,6 +12,7 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require_once dirname(__FILE__) . '/../test_framework/phpbb_session_test_case.php';
|
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
|
class phpbb_session_garbage_collection_test extends phpbb_session_test_case
|
||||||
{
|
{
|
||||||
|
@ -26,6 +27,19 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case
|
||||||
{
|
{
|
||||||
parent::setUp();
|
parent::setUp();
|
||||||
$this->session = $this->session_factory->get_session($this->db);
|
$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(
|
||||||
|
'captchas.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()
|
public function test_cleanup_all()
|
||||||
|
@ -47,7 +61,7 @@ class phpbb_session_garbage_collection_test extends phpbb_session_test_case
|
||||||
global $config;
|
global $config;
|
||||||
$config['session_length'] = 0;
|
$config['session_length'] = 0;
|
||||||
// There is an error unless the captcha plugin is set
|
// 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->session->session_gc();
|
||||||
$this->check_sessions_equals(
|
$this->check_sessions_equals(
|
||||||
array(),
|
array(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue