1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 22:10:45 +02:00

[ticket/16314] Improve handling of page_footer output for controllers

Moved the common template output to controller helper and added
garbage_collection handling to kernel_terminate_subscriber.

PHPBB3-16314
This commit is contained in:
Marc Alexander
2020-01-19 16:03:32 +01:00
parent 6f36a478a5
commit 843e3ae849
6 changed files with 372 additions and 93 deletions

View File

@@ -42,7 +42,6 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
$filesystem = new \phpbb\filesystem\filesystem();
$manager = new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array());
$loader = new \Symfony\Component\Routing\Loader\YamlFileLoader(
new \phpbb\routing\file_locator($filesystem, dirname(__FILE__) . '/')
);
@@ -58,8 +57,27 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
$request
);
$db = $this->getMockBuilder('\phpbb\db\driver\mysqli')
->disableOriginalConstructor()
->getMock();
$this->routing_helper = new \phpbb\routing\helper($this->config, $router, $symfony_request, $request, $filesystem, '', 'php');
$this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $symfony_request, $request, $this->routing_helper);
$this->helper = new phpbb_mock_controller_helper(
new \phpbb\auth\auth(),
new \phpbb\cache\driver\dummy(),
new \phpbb\cron\manager([], $this->routing_helper, '', 'php'),
$db,
new phpbb_mock_event_dispatcher(),
new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),
$this->template,
$this->user,
$this->config,
$symfony_request,
$request,
$this->routing_helper,
'',
'php'
);
$this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper, $phpbb_dispatcher);
}