public function setUp() { 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 setUp() { parent::setUp(); // Get session here so that config is mocked correctly $this->session = $this->session_factory->get_session($this->db); global $cache, $config, $phpbb_root_path, $phpEx; $this->backup_cache = $cache; // Change the global cache object for this test because // the mock cache object does not hit the database as is needed // for this test. $cache = new \phpbb\cache\service(new \phpbb\cache\driver\file(), $config, $this->db, $phpbb_root_path, $phpEx); }