aboutsummaryrefslogtreecommitdiffstats
path: root/tests/session
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-08-09 11:46:10 +0200
committerTristan Darricau <github@nicofuma.fr>2014-08-11 01:16:07 +0200
commit28cf0ef8323d121a25b1c9ddd55fdd76412752ad (patch)
tree96ea239dd8530bdff24a0778b04a7b3941ee567e /tests/session
parent6e4991093ae8f4ce22cc5bdf8b5bd8dcf42c14f3 (diff)
downloadforums-28cf0ef8323d121a25b1c9ddd55fdd76412752ad.tar
forums-28cf0ef8323d121a25b1c9ddd55fdd76412752ad.tar.gz
forums-28cf0ef8323d121a25b1c9ddd55fdd76412752ad.tar.bz2
forums-28cf0ef8323d121a25b1c9ddd55fdd76412752ad.tar.xz
forums-28cf0ef8323d121a25b1c9ddd55fdd76412752ad.zip
[ticket/11854] Update unit tests
PHPBB3-11854
Diffstat (limited to 'tests/session')
-rw-r--r--tests/session/garbage_collection_test.php16
1 files changed, 15 insertions, 1 deletions
diff --git a/tests/session/garbage_collection_test.php b/tests/session/garbage_collection_test.php
index 0fbc71dcd7..027a7ca852 100644
--- a/tests/session/garbage_collection_test.php
+++ b/tests/session/garbage_collection_test.php
@@ -12,6 +12,7 @@
*/
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
{
@@ -26,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(
+ '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()
@@ -47,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(),