diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/controller/common_helper_route.php | 2 | ||||
-rw-r--r-- | tests/controller/controller_test.php | 2 | ||||
-rw-r--r-- | tests/pagination/pagination_test.php | 2 | ||||
-rw-r--r-- | tests/session/testable_factory.php | 3 | ||||
-rw-r--r-- | tests/test_framework/phpbb_functional_test_case.php | 3 |
5 files changed, 7 insertions, 5 deletions
diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php index 72c5328b0b..808eb684f2 100644 --- a/tests/controller/common_helper_route.php +++ b/tests/controller/common_helper_route.php @@ -126,7 +126,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', PHPBB_ENVIRONMENT); + $this->router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php'); // 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 431b26b2bc..e8af2f7485 100644 --- a/tests/controller/controller_test.php +++ b/tests/controller/controller_test.php @@ -47,7 +47,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', PHPBB_ENVIRONMENT); + $router = new phpbb_mock_router($container, $resources_locator, $loader, dirname(__FILE__) . '/', 'php'); $routes = $router->get_routes(); // This will need to be updated if any new routes are defined diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php index 6a3b46cdae..024b6fc02d 100644 --- a/tests/pagination/pagination_test.php +++ b/tests/pagination/pagination_test.php @@ -46,7 +46,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case new \phpbb\routing\file_locator($filesystem, dirname(__FILE__) . '/') ); $resources_locator = new \phpbb\routing\resources_locator\default_resources_locator(dirname(__FILE__) . '/', PHPBB_ENVIRONMENT, $manager); - $router = new phpbb_mock_router(new phpbb_mock_container_builder(), $resources_locator, $loader, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT); + $router = new phpbb_mock_router(new phpbb_mock_container_builder(), $resources_locator, $loader, dirname(__FILE__) . '/', 'php'); $request = new phpbb_mock_request(); $request->overwrite('SCRIPT_NAME', '/app.php', \phpbb\request\request_interface::SERVER); diff --git a/tests/session/testable_factory.php b/tests/session/testable_factory.php index 7819063505..6f8b49122b 100644 --- a/tests/session/testable_factory.php +++ b/tests/session/testable_factory.php @@ -73,7 +73,7 @@ class phpbb_session_testable_factory public function get_session(\phpbb\db\driver\driver_interface $dbal) { // set up all the global variables used by session - global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container; + global $SID, $_SID, $db, $config, $cache, $request, $phpbb_container, $phpbb_root_path; $request = $this->request = new phpbb_mock_request( array(), @@ -95,6 +95,7 @@ class phpbb_session_testable_factory new phpbb_mock_auth_provider() ); $phpbb_container->setParameter('core.environment', PHPBB_ENVIRONMENT); + $phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/'); $provider_collection = new \phpbb\auth\provider_collection($phpbb_container, $config); $provider_collection->add('auth.provider.db'); $phpbb_container->set( diff --git a/tests/test_framework/phpbb_functional_test_case.php b/tests/test_framework/phpbb_functional_test_case.php index 53519617b3..d234642898 100644 --- a/tests/test_framework/phpbb_functional_test_case.php +++ b/tests/test_framework/phpbb_functional_test_case.php @@ -209,10 +209,11 @@ class phpbb_functional_test_case extends phpbb_test_case { if (!$this->cache) { - global $phpbb_container; + global $phpbb_container, $phpbb_root_path; $phpbb_container = new phpbb_mock_container_builder(); $phpbb_container->setParameter('core.environment', PHPBB_ENVIRONMENT); + $phpbb_container->setParameter('core.cache_dir', $phpbb_root_path . 'cache/' . PHPBB_ENVIRONMENT . '/'); $this->cache = new \phpbb\cache\driver\file; } |