1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-10-23 12:46:15 +02:00

[ticket/15905] Try with existing phpbb extension

PHPBB3-15905
This commit is contained in:
mrgoldy
2018-12-09 23:52:50 +01:00
committed by Marc Alexander
parent 012fe18879
commit 7989f3f71f
12 changed files with 77 additions and 109 deletions

View File

@@ -74,7 +74,9 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
protected function generate_route_objects()
{
global $request;
global $request, $phpbb_root_path, $phpEx;
$auth = $this->getMock('\phpbb\auth\auth');
$this->request = new phpbb_mock_request();
$this->request->overwrite('SCRIPT_NAME', $this->get_uri(), \phpbb\request\request_interface::SERVER);
@@ -122,7 +124,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
'autoescape' => false,
)
);
$this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $twig, $this->user)));
$this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($auth, $context, $twig, $this->user)));
$twig->setLexer(new \phpbb\template\twig\lexer($twig));
$this->extension_manager = new phpbb_mock_extension_manager(