mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-30 21:40:43 +02:00
[ticket/11497] Remove 'ext.finder' from services' list
PHPBB3-11497
This commit is contained in:
@@ -29,7 +29,8 @@ class phpbb_controller_controller_test extends phpbb_test_case
|
||||
|
||||
public function test_provider()
|
||||
{
|
||||
$provider = new \phpbb\controller\provider($this->extension_manager->get_finder());
|
||||
$provider = new \phpbb\controller\provider();
|
||||
$provider->set_ext_finder($this->extension_manager->get_finder());
|
||||
$routes = $provider->find(__DIR__)->get_routes();
|
||||
|
||||
// This will need to be updated if any new routes are defined
|
||||
|
@@ -27,23 +27,25 @@ class phpbb_controller_helper_route_test extends phpbb_test_case
|
||||
);
|
||||
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
|
||||
$this->template = new phpbb\template\twig\twig($phpbb_path_helper, $this->config, $this->user, new \phpbb\template\context());
|
||||
$this->extension_manager = new phpbb_mock_extension_manager(
|
||||
dirname(__FILE__) . '/',
|
||||
array(
|
||||
'vendor2/foo' => array(
|
||||
'ext_name' => 'vendor2/foo',
|
||||
'ext_active' => '1',
|
||||
'ext_path' => 'ext/vendor2/foo/',
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
$finder = new \phpbb\extension\finder(
|
||||
new phpbb_mock_extension_manager(
|
||||
dirname(__FILE__) . '/',
|
||||
array(
|
||||
'vendor2/foo' => array(
|
||||
'ext_name' => 'vendor2/foo',
|
||||
'ext_active' => '1',
|
||||
'ext_path' => 'ext/vendor2/foo/',
|
||||
),
|
||||
)
|
||||
),
|
||||
$this->extension_manager,
|
||||
new \phpbb\filesystem(),
|
||||
dirname(__FILE__) . '/',
|
||||
new phpbb_mock_cache()
|
||||
);
|
||||
$this->provider = new \phpbb\controller\provider($finder);
|
||||
$this->provider = new \phpbb\controller\provider();
|
||||
$this->provider->set_ext_finder($finder);
|
||||
$this->provider->find(dirname(__FILE__) . '/');
|
||||
}
|
||||
|
||||
@@ -82,7 +84,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\controller\helper($this->template, $this->user, $this->config, $this->provider, '', 'php');
|
||||
$this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager,'', 'php');
|
||||
$this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id));
|
||||
}
|
||||
|
||||
@@ -122,7 +124,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\controller\helper($this->template, $this->user, $this->config, $this->provider, '', 'php');
|
||||
$this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $this->provider, $this->extension_manager,'', 'php');
|
||||
$this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id));
|
||||
}
|
||||
}
|
||||
|
@@ -30,17 +30,19 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
|
||||
->method('lang')
|
||||
->will($this->returnCallback(array($this, 'return_callback_implode')));
|
||||
|
||||
$manager = new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array());
|
||||
$this->finder = new \phpbb\extension\finder(
|
||||
new phpbb_mock_extension_manager(dirname(__FILE__) . '/', array()),
|
||||
$manager,
|
||||
new \phpbb\filesystem(),
|
||||
dirname(__FILE__) . '/',
|
||||
new phpbb_mock_cache()
|
||||
);
|
||||
|
||||
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1'));
|
||||
$provider = new \phpbb\controller\provider($this->finder);
|
||||
$provider = new \phpbb\controller\provider();
|
||||
$this->provider->set_ext_finder($this->finder);
|
||||
$provider->find(dirname(__FILE__) . '/');
|
||||
$this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $provider, '', 'php');
|
||||
$this->helper = new \phpbb\controller\helper($this->template, $this->user, $this->config, $provider, $manager, '', 'php');
|
||||
$this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user