aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid King <imkingdavid@gmail.com>2013-09-12 09:22:51 -0700
committerDavid King <imkingdavid@gmail.com>2013-09-12 09:22:51 -0700
commit2f91fc9f6c6d479fdf286fa34047b1599b89d87d (patch)
tree57b3a7bc0a3bfc657517bb6cd01391e3b74ff30f
parent6f4ad0bcfab67dfad074f6494edda6490bfb1d82 (diff)
downloadforums-2f91fc9f6c6d479fdf286fa34047b1599b89d87d.tar
forums-2f91fc9f6c6d479fdf286fa34047b1599b89d87d.tar.gz
forums-2f91fc9f6c6d479fdf286fa34047b1599b89d87d.tar.bz2
forums-2f91fc9f6c6d479fdf286fa34047b1599b89d87d.tar.xz
forums-2f91fc9f6c6d479fdf286fa34047b1599b89d87d.zip
[ticket/11824] Reorganize test file
PHPBB3-11824
-rw-r--r--tests/controller/helper_url_test.php35
1 files changed, 17 insertions, 18 deletions
diff --git a/tests/controller/helper_url_test.php b/tests/controller/helper_url_test.php
index 8a793ea0a4..da90947bb5 100644
--- a/tests/controller/helper_url_test.php
+++ b/tests/controller/helper_url_test.php
@@ -40,6 +40,23 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
);
}
+ /**
+ * @dataProvider helper_url_data_no_rewrite()
+ */
+ public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
+ {
+ global $phpbb_dispatcher, $phpbb_root_path, $phpEx;
+
+ $phpbb_dispatcher = new phpbb_mock_event_dispatcher;
+ $this->user = $this->getMock('phpbb_user');
+ $this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $this->user, new phpbb_template_context());
+
+ // We don't use mod_rewrite in these tests
+ $config = new phpbb_config(array('enable_mod_rewrite' => '0'));
+ $helper = new phpbb_controller_helper($this->template, $this->user, $config, '', 'php');
+ $this->assertEquals($helper->url($route, $params, $is_amp, $session_id), $expected);
+ }
+
public function helper_url_data_with_rewrite()
{
return array(
@@ -69,23 +86,6 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
}
/**
- * @dataProvider helper_url_data_no_rewrite()
- */
- public function test_helper_url_no_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
- {
- global $phpbb_dispatcher, $phpbb_root_path, $phpEx;
-
- $phpbb_dispatcher = new phpbb_mock_event_dispatcher;
- $this->user = $this->getMock('phpbb_user');
- $this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $this->user, new phpbb_template_context());
-
- // We don't use mod_rewrite in tests
- $config = new phpbb_config(array('enable_mod_rewrite' => '0'));
- $helper = new phpbb_controller_helper($this->template, $this->user, $config, '', 'php');
- $this->assertEquals($helper->url($route, $params, $is_amp, $session_id), $expected);
- }
-
- /**
* @dataProvider helper_url_data_with_rewrite()
*/
public function test_helper_url_with_rewrite($route, $params, $is_amp, $session_id, $expected, $description)
@@ -96,7 +96,6 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
$this->user = $this->getMock('phpbb_user');
$this->template = new phpbb_template_twig($phpbb_root_path, $phpEx, $config, $this->user, new phpbb_template_context());
- // We don't use mod_rewrite in tests
$config = new phpbb_config(array('enable_mod_rewrite' => '1'));
$helper = new phpbb_controller_helper($this->template, $this->user, $config, '', 'php');
$this->assertEquals($helper->url($route, $params, $is_amp, $session_id), $expected);