aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/avatar/driver/barfoo.php52
-rw-r--r--tests/avatar/driver/foobar.php52
-rw-r--r--tests/controller/common_helper_route.php6
-rw-r--r--tests/controller/controller_test.php4
-rw-r--r--tests/pagination/pagination_test.php10
5 files changed, 59 insertions, 65 deletions
diff --git a/tests/avatar/driver/barfoo.php b/tests/avatar/driver/barfoo.php
index 0bf30b8a91..067bb3ef97 100644
--- a/tests/avatar/driver/barfoo.php
+++ b/tests/avatar/driver/barfoo.php
@@ -1,26 +1,26 @@
-<?php
-
-namespace phpbb\avatar\driver;
-
-class barfoo extends \phpbb\avatar\driver\driver
-{
- public function get_data($row)
- {
- return array();
- }
-
- public function prepare_form($request, $template, $user, $row, &$error)
- {
- return false;
- }
-
- public function process_form($request, $template, $user, $row, &$error)
- {
- return false;
- }
-
- public function get_template_name()
- {
- return 'barfoo.html';
- }
-}
+<?php
+
+namespace phpbb\avatar\driver;
+
+class barfoo extends \phpbb\avatar\driver\driver
+{
+ public function get_data($row)
+ {
+ return array();
+ }
+
+ public function prepare_form($request, $template, $user, $row, &$error)
+ {
+ return false;
+ }
+
+ public function process_form($request, $template, $user, $row, &$error)
+ {
+ return false;
+ }
+
+ public function get_template_name()
+ {
+ return 'barfoo.html';
+ }
+}
diff --git a/tests/avatar/driver/foobar.php b/tests/avatar/driver/foobar.php
index aabdaf5ac4..16d50ccad4 100644
--- a/tests/avatar/driver/foobar.php
+++ b/tests/avatar/driver/foobar.php
@@ -1,26 +1,26 @@
-<?php
-
-namespace phpbb\avatar\driver;
-
-class foobar extends \phpbb\avatar\driver\driver
-{
- public function get_data($row)
- {
- return array();
- }
-
- public function prepare_form($request, $template, $user, $row, &$error)
- {
- return false;
- }
-
- public function process_form($request, $template, $user, $row, &$error)
- {
- return false;
- }
-
- public function get_template_name()
- {
- return 'foobar.html';
- }
-}
+<?php
+
+namespace phpbb\avatar\driver;
+
+class foobar extends \phpbb\avatar\driver\driver
+{
+ public function get_data($row)
+ {
+ return array();
+ }
+
+ public function prepare_form($request, $template, $user, $row, &$error)
+ {
+ return false;
+ }
+
+ public function process_form($request, $template, $user, $row, &$error)
+ {
+ return false;
+ }
+
+ public function get_template_name()
+ {
+ return 'foobar.html';
+ }
+}
diff --git a/tests/controller/common_helper_route.php b/tests/controller/common_helper_route.php
index 5baa846ec3..19d40cf071 100644
--- a/tests/controller/common_helper_route.php
+++ b/tests/controller/common_helper_route.php
@@ -113,8 +113,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
)
);
- $this->router = new phpbb_mock_router($this->extension_manager, dirname(__FILE__) . '/', 'php');
- $this->router->find_routing_files($finder);
+ $this->router = new phpbb_mock_router($this->extension_manager, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $this->router->find_routing_files($this->extension_manager->all_enabled());
$this->router->find(dirname(__FILE__) . '/');
// Set correct current phpBB root path
$this->root_path = $this->get_phpbb_root_path();
@@ -319,7 +319,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
$this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->router, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/');
$this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::NETWORK_PATH), $description);
}
-//TODO
+
public function helper_url_data_absolute_with_rewrite()
{
return array(
diff --git a/tests/controller/controller_test.php b/tests/controller/controller_test.php
index 637e9685e6..354a902831 100644
--- a/tests/controller/controller_test.php
+++ b/tests/controller/controller_test.php
@@ -40,8 +40,8 @@ class phpbb_controller_controller_test extends phpbb_test_case
public function test_router_find_files()
{
- $router = new \phpbb\routing\router($this->extension_manager, dirname(__FILE__) . '/', 'php');
- $router->find_routing_files($this->extension_manager->get_finder());
+ $router = new \phpbb\routing\router($this->extension_manager, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $router->find_routing_files($this->extension_manager->all_enabled());
$routes = $router->find(__DIR__)->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 04f7b807a7..1b9e8c751c 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -36,16 +36,10 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
$filesystem = new \phpbb\filesystem();
$manager = new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array());
- $finder = new \phpbb\finder(
- $filesystem,
- dirname(__FILE__) . '/',
- new phpbb_mock_cache()
- );
- $finder->set_extensions(array_keys($manager->all_enabled()));
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1'));
- $router = new phpbb_mock_router($manager, dirname(__FILE__) . '/', 'php');
- $router->find_routing_files($finder);
+ $router = new phpbb_mock_router($manager, dirname(__FILE__) . '/', 'php', PHPBB_ENVIRONMENT);
+ $router->find_routing_files($manager->all_enabled());
$router->find(dirname(__FILE__) . '/');
$request = new phpbb_mock_request();