From 27fc256745c5fafc42855636295c503c26d0a910 Mon Sep 17 00:00:00 2001 From: rubencm Date: Thu, 13 Sep 2018 15:17:12 +0000 Subject: [ticket/12629] Fix tests PHPBB3-12629 --- tests/controller/common_helper_route.php | 2 +- tests/controller/controller_test.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'tests/controller') diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php index ea2bc042b1..dc43204e2d 100644 --- a/tests/controller/common_helper_route.php +++ b/tests/controller/common_helper_route.php @@ -140,7 +140,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case new \phpbb\routing\file_locator($this->filesystem, dirname(__FILE__) . '/') ); $resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $this->extension_manager); - $this->router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php'); + $this->router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php', false); // Set correct current phpBB root path $this->root_path = $this->get_phpbb_root_path(); diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index d921d0eade..34839e65d0 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -48,7 +48,7 @@ class phpbb_controller_controller_test extends phpbb_test_case new \phpbb\routing\file_locator(new \phpbb\filesystem\filesystem(), dirname(__FILE__) . '/') ); $resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $this->extension_manager); - $router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php'); + $router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php', false); $routes = $router->get_routes(); // This will need to be updated if any new routes are defined -- cgit v1.2.1 From 40e61e4d1ec3da2ea48efda401b0044f2aff6071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois-Xavier=20de=20Guillebon?= Date: Tue, 16 Jan 2018 12:46:48 +0100 Subject: [ticket/15508] Remove call to getEnvironment() from parser PHPBB3-15508 --- tests/controller/common_helper_route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/controller') diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php index dc43204e2d..21a7cfd182 100644 --- a/tests/controller/common_helper_route.php +++ b/tests/controller/common_helper_route.php @@ -122,7 +122,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case 'autoescape' => false, ) ); - $this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $this->user))); + $this->template = new phpbb\template\twig\twig($this->phpbb_path_helper, $this->config, $context, $twig, $cache_path, $this->user, array(new \phpbb\template\twig\extension($context, $twig, $this->user))); $twig->setLexer(new \phpbb\template\twig\lexer($twig)); $this->extension_manager = new phpbb_mock_extension_manager( -- cgit v1.2.1 From ebac54aa9e705e99a562d2fe2c0f57bc6af8dd32 Mon Sep 17 00:00:00 2001 From: Marc Alexander Date: Sun, 30 Dec 2018 11:36:08 +0100 Subject: [ticket/14948] Adjust calls for twig and phpunit updates PHPBB3-14948 --- tests/controller/common_helper_route.php | 2 +- tests/controller/controller_test.php | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) (limited to 'tests/controller') diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php index 21a7cfd182..447c10d10e 100644 --- a/tests/controller/common_helper_route.php +++ b/tests/controller/common_helper_route.php @@ -29,7 +29,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case private $router; private $routing_helper; - public function setUp() + public function setUp(): void { global $phpbb_dispatcher, $phpbb_root_path, $phpEx; diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php index 34839e65d0..ddc1921b0e 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -21,7 +21,7 @@ use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; class phpbb_controller_controller_test extends phpbb_test_case { - public function setUp() + public function setUp(): void { $this->extension_manager = new phpbb_mock_extension_manager( dirname(__FILE__) . '/', @@ -128,7 +128,8 @@ class phpbb_controller_controller_test extends phpbb_test_case if (!empty($exception)) { - $this->setExpectedException($exception, $exception_message); + $this->expectException($exception); + $this->expectExceptionMessage($exception_message); } $this->assertEquals($expected, $resolver->getArguments($symfony_request, $input)); -- cgit v1.2.1 From dcab0762210a4059cca7458344dcc1aeb0360c42 Mon Sep 17 00:00:00 2001 From: rxu Date: Sun, 29 Dec 2019 02:12:36 +0700 Subject: [ticket/16276] Further fix PHP nightly tests PHPBB3-16276 --- tests/controller/common_helper_route.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/controller') diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php index 447c10d10e..bdaf8ee682 100644 --- a/tests/controller/common_helper_route.php +++ b/tests/controller/common_helper_route.php @@ -74,7 +74,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case protected function generate_route_objects() { - global $request; + global $request, $phpbb_root_path, $phpEx; $this->request = new phpbb_mock_request(); $this->request->overwrite('SCRIPT_NAME', $this->get_uri(), \phpbb\request\request_interface::SERVER); -- cgit v1.2.1