[ticket/13063] Fix tests after rebase

PHPBB3-13063
This commit is contained in:
Tristan Darricau 2014-11-20 16:37:45 +01:00
parent dec8b0de47
commit fdcd6e81cd
3 changed files with 18 additions and 19 deletions

View file

@ -75,14 +75,13 @@ class helper
* @param \phpbb\user $user User object * @param \phpbb\user $user User object
* @param \phpbb\config\config $config Config object * @param \phpbb\config\config $config Config object
* @param \phpbb\routing\router $router phpBB router * @param \phpbb\routing\router $router phpBB router
* @param \phpbb\extension\manager $manager Extension manager object
* @param \phpbb\symfony_request $symfony_request Symfony Request object * @param \phpbb\symfony_request $symfony_request Symfony Request object
* @param \phpbb\request\request_interface $request phpBB request object * @param \phpbb\request\request_interface $request phpBB request object
* @param \phpbb\filesystem $filesystem The filesystem object * @param \phpbb\filesystem $filesystem The filesystem object
* @param string $phpbb_root_path phpBB root path * @param string $phpbb_root_path phpBB root path
* @param string $php_ext PHP file extension * @param string $php_ext PHP file extension
*/ */
public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\routing\router $router, \phpbb\extension\manager $manager, \phpbb\symfony_request $symfony_request, \phpbb\request\request_interface $request, \phpbb\filesystem $filesystem, $phpbb_root_path, $php_ext) public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\config\config $config, \phpbb\routing\router $router, \phpbb\symfony_request $symfony_request, \phpbb\request\request_interface $request, \phpbb\filesystem $filesystem, $phpbb_root_path, $php_ext)
{ {
$this->template = $template; $this->template = $template;
$this->user = $user; $this->user = $user;

View file

@ -162,8 +162,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description) public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
{ {
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0')); $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
$this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->router, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/'); $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)); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id), $description);
} }
public function helper_url_data_with_rewrite() public function helper_url_data_with_rewrite()
@ -202,8 +202,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description) 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->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1'));
$this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->router, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/'); $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)); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id), $description);
} }
public function helper_url_data_absolute() public function helper_url_data_absolute()
@ -242,8 +242,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_absolute($route, $params, $is_amp, $session_id, $expected, $description) public function test_helper_url_absolute($route, $params, $is_amp, $session_id, $expected, $description)
{ {
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0')); $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
$this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->router, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/'); $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::ABSOLUTE_URL)); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::ABSOLUTE_URL), $description);
} }
public function helper_url_data_relative_path() public function helper_url_data_relative_path()
@ -282,8 +282,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_relative_path($route, $params, $is_amp, $session_id, $expected, $description) public function test_helper_url_relative_path($route, $params, $is_amp, $session_id, $expected, $description)
{ {
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0')); $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
$this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->router, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/'); $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::RELATIVE_PATH)); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::RELATIVE_PATH), $description);
} }
public function helper_url_data_network() public function helper_url_data_network()
@ -322,8 +322,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_network($route, $params, $is_amp, $session_id, $expected, $description) public function test_helper_url_network($route, $params, $is_amp, $session_id, $expected, $description)
{ {
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0')); $this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '0'));
$this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $this->router, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/'); $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)); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::NETWORK_PATH), $description);
} }
//TODO //TODO
public function helper_url_data_absolute_with_rewrite() public function helper_url_data_absolute_with_rewrite()
@ -362,8 +362,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_absolute_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description) public function test_helper_url_absolute_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
{ {
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1')); $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->router, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/'); $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::ABSOLUTE_URL)); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::ABSOLUTE_URL), $description);
} }
public function helper_url_data_relative_path_with_rewrite() public function helper_url_data_relative_path_with_rewrite()
@ -402,8 +402,8 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_relative_path_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description) public function test_helper_url_relative_path_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
{ {
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1')); $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->router, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/'); $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::RELATIVE_PATH)); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::RELATIVE_PATH), $description);
} }
public function helper_url_data_network_with_rewrite() public function helper_url_data_network_with_rewrite()
@ -442,7 +442,7 @@ abstract class phpbb_controller_common_helper_route extends phpbb_test_case
public function test_helper_url_network_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description) public function test_helper_url_network_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
{ {
$this->config = new \phpbb\config\config(array('enable_mod_rewrite' => '1')); $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->router, $this->extension_manager, $this->symfony_request, $this->request, $this->filesystem, $this->root_path, 'php', dirname(__FILE__) . '/'); $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)); $this->assertEquals($expected, $this->helper->route($route, $params, $is_amp, $session_id, UrlGeneratorInterface::NETWORK_PATH), $description);
} }
} }

View file

@ -57,7 +57,7 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
$request $request
); );
$this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $router, $manager, $symfony_request, $request, $filesystem, '', 'php', dirname(__FILE__) . '/'); $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $router, $symfony_request, $request, $filesystem, '', 'php', dirname(__FILE__) . '/');
$this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper, $phpbb_dispatcher); $this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper, $phpbb_dispatcher);
} }