From e53102feadac5f4729b868f9c023021aa46581b0 Mon Sep 17 00:00:00 2001 From: lionel-rowe Date: Sun, 3 Apr 2022 20:46:44 +0100 Subject: [PATCH] [ticket/16977] Fix broken tests PHPBB3-16977 --- tests/console/cron/cron_list_test.php | 2 +- tests/console/cron/run_test.php | 6 +++--- tests/controller/common_helper_route.php | 18 +++++++++--------- tests/cron/manager_test.php | 2 +- tests/pagination/pagination_test.php | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/tests/console/cron/cron_list_test.php b/tests/console/cron/cron_list_test.php index 30e93a7850..4694451ab3 100644 --- a/tests/console/cron/cron_list_test.php +++ b/tests/console/cron/cron_list_test.php @@ -105,7 +105,7 @@ class phpbb_console_command_cron_list_test extends phpbb_test_case $mock_container = new phpbb_mock_container_builder(); $mock_container->set('cron.task_collection', []); - $this->cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $pathEx); + $this->cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $pathEx, null); $this->cron_manager->load_tasks($tasks); } diff --git a/tests/console/cron/run_test.php b/tests/console/cron/run_test.php index 205ff821b5..b5d7656ec0 100644 --- a/tests/console/cron/run_test.php +++ b/tests/console/cron/run_test.php @@ -81,7 +81,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case $mock_container = new phpbb_mock_container_builder(); $mock_container->set('cron.task_collection', []); - $this->cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $phpEx); + $this->cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $phpEx, null); $this->cron_manager->load_tasks($tasks); $this->assertSame('0', $config['cron_lock']); @@ -160,7 +160,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case $mock_container = new phpbb_mock_container_builder(); $mock_container->set('cron.task_collection', []); - $this->cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $phpEx); + $this->cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $phpEx, null); $this->cron_manager->load_tasks($tasks); $command_tester = $this->get_command_tester(); @@ -208,7 +208,7 @@ class phpbb_console_command_cron_run_test extends phpbb_database_test_case $mock_container = new phpbb_mock_container_builder(); $mock_container->set('cron.task_collection', []); - $this->cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $phpEx); + $this->cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $phpEx, null); $this->cron_manager->load_tasks($tasks); $command_tester = $this->get_command_tester(); diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php index b565f17f1a..be755593c7 100644 --- a/tests/controller/common_helper_route.php +++ b/tests/controller/common_helper_route.php @@ -212,7 +212,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, @@ -275,7 +275,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, @@ -338,7 +338,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, @@ -401,7 +401,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, @@ -464,7 +464,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, @@ -527,7 +527,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, @@ -587,7 +587,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, @@ -650,7 +650,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, @@ -701,7 +701,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_database_test_ $this->auth, $this->cache, $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, $this->root_path, 'php', null), $this->db, $this->dispatcher, $this->language, diff --git a/tests/cron/manager_test.php b/tests/cron/manager_test.php index ea8ebc05dc..99bcf4cc59 100644 --- a/tests/cron/manager_test.php +++ b/tests/cron/manager_test.php @@ -105,7 +105,7 @@ class phpbb_cron_manager_test extends \phpbb_test_case $mock_container = new phpbb_mock_container_builder(); $mock_container->set('cron.task_collection', []); - $cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $phpEx); + $cron_manager = new \phpbb\cron\manager($mock_container, $routing_helper, $phpbb_root_path, $phpEx, null); $cron_manager->load_tasks($tasks); return $cron_manager; diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php index aa192a7040..58557bca52 100644 --- a/tests/pagination/pagination_test.php +++ b/tests/pagination/pagination_test.php @@ -70,7 +70,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case new \phpbb\auth\auth(), new \phpbb\cache\driver\dummy(), $this->config, - new \phpbb\cron\manager($mock_container, $this->routing_helper, '', 'php'), + new \phpbb\cron\manager($mock_container, $this->routing_helper, '', 'php', null), $db, new phpbb_mock_event_dispatcher(), new \phpbb\language\language(new \phpbb\language\language_file_loader($phpbb_root_path, $phpEx)),