mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/13713] Add mention_helper for testing in helpers
PHPBB3-13713
This commit is contained in:
parent
e3cee76077
commit
224d753414
1 changed files with 14 additions and 1 deletions
|
@ -579,6 +579,9 @@ class phpbb_test_case_helpers
|
||||||
}
|
}
|
||||||
$user->add_lang('common');
|
$user->add_lang('common');
|
||||||
|
|
||||||
|
// Get an auth interface
|
||||||
|
$auth = ($container->has('auth')) ? $container->get('auth') : new \phpbb\auth\auth;
|
||||||
|
|
||||||
// Create and register a quote_helper
|
// Create and register a quote_helper
|
||||||
$quote_helper = new \phpbb\textformatter\s9e\quote_helper(
|
$quote_helper = new \phpbb\textformatter\s9e\quote_helper(
|
||||||
$container->get('user'),
|
$container->get('user'),
|
||||||
|
@ -587,6 +590,16 @@ class phpbb_test_case_helpers
|
||||||
);
|
);
|
||||||
$container->set('text_formatter.s9e.quote_helper', $quote_helper);
|
$container->set('text_formatter.s9e.quote_helper', $quote_helper);
|
||||||
|
|
||||||
|
// Create and register a mention_helper
|
||||||
|
$mention_helper = new \phpbb\textformatter\s9e\mention_helper(
|
||||||
|
$db_driver,
|
||||||
|
$auth,
|
||||||
|
$container->get('user'),
|
||||||
|
$phpbb_root_path,
|
||||||
|
$phpEx
|
||||||
|
);
|
||||||
|
$container->set('text_formatter.s9e.mention_helper', $mention_helper);
|
||||||
|
|
||||||
// Create and register the text_formatter.s9e.parser service and its alias
|
// Create and register the text_formatter.s9e.parser service and its alias
|
||||||
$parser = new \phpbb\textformatter\s9e\parser(
|
$parser = new \phpbb\textformatter\s9e\parser(
|
||||||
$cache,
|
$cache,
|
||||||
|
@ -607,8 +620,8 @@ class phpbb_test_case_helpers
|
||||||
);
|
);
|
||||||
|
|
||||||
// Calls configured in services.yml
|
// Calls configured in services.yml
|
||||||
$auth = ($container->has('auth')) ? $container->get('auth') : new \phpbb\auth\auth;
|
|
||||||
$renderer->configure_quote_helper($quote_helper);
|
$renderer->configure_quote_helper($quote_helper);
|
||||||
|
$renderer->configure_mention_helper($mention_helper);
|
||||||
$renderer->configure_smilies_path($config, $path_helper);
|
$renderer->configure_smilies_path($config, $path_helper);
|
||||||
$renderer->configure_user($user, $config, $auth);
|
$renderer->configure_user($user, $config, $auth);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue