diff options
author | JoshyPHP <s9e.dev@gmail.com> | 2015-03-19 12:45:12 +0100 |
---|---|---|
committer | JoshyPHP <s9e.dev@gmail.com> | 2015-04-02 19:16:03 +0200 |
commit | 49b9e8e4eafff93f25a99bf263982fe79b7f0549 (patch) | |
tree | e35553682ab88a57a9520b84e4f7e1cdedf13454 /tests/test_framework | |
parent | f4f5bdbaee48d0ed341ec9b720579a4f751916fc (diff) | |
download | forums-49b9e8e4eafff93f25a99bf263982fe79b7f0549.tar forums-49b9e8e4eafff93f25a99bf263982fe79b7f0549.tar.gz forums-49b9e8e4eafff93f25a99bf263982fe79b7f0549.tar.bz2 forums-49b9e8e4eafff93f25a99bf263982fe79b7f0549.tar.xz forums-49b9e8e4eafff93f25a99bf263982fe79b7f0549.zip |
[ticket/11768] Added configurator events
PHPBB3-11768
Diffstat (limited to 'tests/test_framework')
-rw-r--r-- | tests/test_framework/phpbb_test_case_helpers.php | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/tests/test_framework/phpbb_test_case_helpers.php b/tests/test_framework/phpbb_test_case_helpers.php index e584c238a2..5c6da94014 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_root_path, $phpEx; + global $phpbb_container, $phpbb_dispatcher, $phpbb_root_path, $phpEx; $cache_dir = __DIR__ . '/../tmp/'; @@ -443,8 +443,22 @@ class phpbb_test_case_helpers ); } + // Create an event dispatcher + if ($container->has('dispatcher')) + { + $dispatcher = $container->get('dispatcher'); + } + else if (isset($phpbb_dispatcher)) + { + $dispatcher = $phpbb_dispatcher; + } + else + { + $dispatcher = new phpbb_mock_event_dispatcher; + } + // Create and register the text_formatter.s9e.factory service - $factory = new \phpbb\textformatter\s9e\factory($dal, $cache, $cache_dir, $cache_key_parser, $cache_key_renderer); + $factory = new \phpbb\textformatter\s9e\factory($dal, $cache, $dispatcher, $cache_dir, $cache_key_parser, $cache_key_renderer); $container->set('text_formatter.s9e.factory', $factory); // Create a user if none was provided, and add the common lang strings |