mirror of
https://github.com/phpbb/phpbb.git
synced 2025-08-09 02:06:32 +02:00
[ticket/14542] Move cron to controller
PHPBB3-14542
This commit is contained in:
@@ -74,7 +74,34 @@ class phpbb_console_command_cron_list_test extends phpbb_test_case
|
||||
$task->set_name('command' . $i);
|
||||
$i++;
|
||||
}
|
||||
$this->cron_manager = new \phpbb\cron\manager($tasks, $phpbb_root_path, $pathEx);
|
||||
|
||||
$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,
|
||||
$pathEx
|
||||
);
|
||||
|
||||
$this->cron_manager = new \phpbb\cron\manager($tasks, $routing_helper, $phpbb_root_path, $pathEx);
|
||||
}
|
||||
|
||||
public function get_command_tester()
|
||||
|
Reference in New Issue
Block a user