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

[ticket/14542] Move cron to controller

PHPBB3-14542
This commit is contained in:
Máté Bartus
2016-03-18 22:57:02 +01:00
parent d74e85ffd9
commit 6eecc26e31
13 changed files with 374 additions and 83 deletions

View File

@@ -75,6 +75,32 @@ class phpbb_cron_manager_test extends \phpbb_test_case
{
global $phpbb_root_path, $phpEx;
return new \phpbb\cron\manager($tasks, $phpbb_root_path, $phpEx);
$mock_config = new \phpbb\config\config(array(
'force_server_vars' => false,
'enable_mod_rewrite' => '',
));
$mock_router = $this->getMockBuilder('\phpbb\routing\router')
->setMethods(array('setContext', 'generate'))
->disableOriginalConstructor()
->getMock();
$mock_router->method('setContext')
->willReturn(true);
$mock_router->method('generate')
->willReturn('foobar');
$request = new \phpbb\request\request();
$routing_helper = new \phpbb\routing\helper(
$mock_config,
$mock_router,
new \phpbb\symfony_request($request),
$request,
new \phpbb\filesystem\filesystem(),
$phpbb_root_path,
$phpEx
);
return new \phpbb\cron\manager($tasks, $routing_helper, $phpbb_root_path, $phpEx);
}
}