aboutsummaryrefslogtreecommitdiffstats
path: root/tests/test_framework
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test_framework')
-rw-r--r--tests/test_framework/phpbb_test_case_helpers.php9
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php
index 0166b11d06..cb77c6829c 100644
--- a/tests/test_framework/phpbb_test_case_helpers.php
+++ b/tests/test_framework/phpbb_test_case_helpers.php
@@ -315,7 +315,7 @@ class phpbb_test_case_helpers
public function set_s9e_services(ContainerInterface $container = null, $fixture = null, $styles_path = null)
{
static $first_run;
- global $phpbb_container, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $user;
+ global $phpbb_container, $phpbb_dispatcher, $phpbb_root_path, $phpEx, $request, $user;
$cache_dir = __DIR__ . '/../tmp/';
@@ -490,6 +490,12 @@ class phpbb_test_case_helpers
}
}
+ // Create a fake request
+ if (!isset($request))
+ {
+ $request = new phpbb_mock_request;
+ }
+
// Create and register the text_formatter.s9e.factory service
$factory = new \phpbb\textformatter\s9e\factory($dal, $cache, $dispatcher, $config, $cache_dir, $cache_key_parser, $cache_key_renderer);
$container->set('text_formatter.s9e.factory', $factory);
@@ -513,6 +519,7 @@ class phpbb_test_case_helpers
->will($this->test_case->returnCallback(__CLASS__ . '::format_date'));
$user->date_format = 'Y-m-d H:i:s';
+ $user->host = 'localhost';
$user->optionset('viewcensors', true);
$user->optionset('viewflash', true);
$user->optionset('viewimg', true);