diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/controller/helper_route_test.php | 7 | ||||
-rw-r--r-- | tests/mock/controller_helper.php | 3 | ||||
-rw-r--r-- | tests/pagination/pagination_test.php | 5 |
3 files changed, 9 insertions, 6 deletions
diff --git a/tests/controller/helper_route_test.php b/tests/controller/helper_route_test.php index 5b0cde2c20..203abccafb 100644 --- a/tests/controller/helper_route_test.php +++ b/tests/controller/helper_route_test.php @@ -30,9 +30,10 @@ class phpbb_controller_helper_route_test extends phpbb_test_case $this->symfony_request = new \phpbb\symfony_request( $request ); + $this->filesystem = new \phpbb\filesystem(); $phpbb_path_helper = new \phpbb\path_helper( $this->symfony_request, - new \phpbb\filesystem(), + $this->filesystem, $this->getMock('\phpbb\request\request'), $phpbb_root_path, $phpEx @@ -96,7 +97,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case */ public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description) { - $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, '', 'php', dirname(__FILE__) . '/'); + $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->filesystem, '', 'php', dirname(__FILE__) . '/'); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id)); } @@ -136,7 +137,7 @@ class phpbb_controller_helper_route_test extends phpbb_test_case public function test_helper_url_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description) { $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1')); - $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, '', 'php', dirname(__FILE__) . '/'); + $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager, $this->symfony_request, $this->filesystem, '', 'php', dirname(__FILE__) . '/'); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id)); } } diff --git a/tests/mock/controller_helper.php b/tests/mock/controller_helper.php index fd49f4bdc8..9c13c309f2 100644 --- a/tests/mock/controller_helper.php +++ b/tests/mock/controller_helper.php @@ -13,12 +13,13 @@ class phpbb_mock_controller_helper extends \phpbb\controller\helper { - public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, \phpbb\symfony_request $symfony_request, $phpbb_root_path, $php_ext, $phpbb_root_path_ext) + public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\controller\provider $provider, \phpbb\extension\manager $manager, \phpbb\symfony_request $symfony_request, \phpbb\filesystem $filesystem, $phpbb_root_path, $php_ext, $phpbb_root_path_ext) { $this->template = $template; $this->user = $user; $this->config = $config; $this->symfony_request = $symfony_request; + $this->filesystem = $filesystem; $this->phpbb_root_path = $phpbb_root_path; $this->php_ext = $php_ext; $provider->find_routing_files($manager->get_finder()); diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php index ad7d207bb5..95856dd07d 100644 --- a/tests/pagination/pagination_test.php +++ b/tests/pagination/pagination_test.php @@ -34,9 +34,10 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case ->method('lang') ->will($this->returnCallback(array($this, 'return_callback_implode'))); + $filesystem = new \phpbb\filesystem(); $manager = new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array()); $finder = new \phpbb\finder( - new \phpbb\filesystem(), + $filesystem, dirname(__FILE__) . '/', new phpbb_mock_cache() ); @@ -56,7 +57,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case $request ); - $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $provider, $manager, $symfony_request, '', 'php', dirname(__FILE__) . '/'); + $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $provider, $manager, $symfony_request, $filesystem, '', 'php', dirname(__FILE__) . '/'); $this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper); } |