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:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user