aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pagination/pagination_test.php
diff options
context:
space:
mode:
authorTristan Darricau <github@nicofuma.fr>2014-09-04 23:18:26 +0200
committerTristan Darricau <github@nicofuma.fr>2014-09-04 23:21:56 +0200
commit4f44e73b21946c3a7f4f2bf2a7a693129570aaad (patch)
treeadc702a40644de6b5f9c5a975716dad29edafde7 /tests/pagination/pagination_test.php
parentcb3eb84665db10e6fe55e11e694d39e742f313a4 (diff)
downloadforums-4f44e73b21946c3a7f4f2bf2a7a693129570aaad.tar
forums-4f44e73b21946c3a7f4f2bf2a7a693129570aaad.tar.gz
forums-4f44e73b21946c3a7f4f2bf2a7a693129570aaad.tar.bz2
forums-4f44e73b21946c3a7f4f2bf2a7a693129570aaad.tar.xz
forums-4f44e73b21946c3a7f4f2bf2a7a693129570aaad.zip
[ticket/13034] Fix unit tests
PHPBB3-13034
Diffstat (limited to 'tests/pagination/pagination_test.php')
-rw-r--r--tests/pagination/pagination_test.php56
1 files changed, 33 insertions, 23 deletions
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index 321d6c2caf..ad7d207bb5 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -46,7 +46,17 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
$provider = new \phpbb\controller\provider();
$provider->find_routing_files($finder);
$provider->find(dirname(__FILE__) . '/');
- $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $provider, $manager, '', 'php', dirname(__FILE__) . '/');
+
+ $request = new phpbb_mock_request();
+ $request->overwrite('SCRIPT_NAME', '/app.php', \phpbb\request\request_interface::SERVER);
+ $request->overwrite('SCRIPT_FILENAME', 'app.php', \phpbb\request\request_interface::SERVER);
+ $request->overwrite('REQUEST_URI', '/app.php', \phpbb\request\request_interface::SERVER);
+
+ $symfony_request = new \phpbb\symfony_request(
+ $request
+ );
+
+ $this->helper = new phpbb_mock_controller_helper($this->template, $this->user, $this->config, $provider, $manager, $symfony_request, '', 'php', dirname(__FILE__) . '/');
$this->pagination = new \phpbb\pagination($this->template, $this->user, $this->helper);
}
@@ -110,17 +120,17 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
:per_page:10
:current_page:2
:base_url:
- :previous::test
- :else:1:test
- :current:2:test/page/2
- :else:3:test/page/3
- :else:4:test/page/4
- :else:5:test/page/5
- :ellipsis:9:test/page/9
- :else:10:test/page/10
- :next::test/page/3
- :u_prev:test
- :u_next:test/page/3',
+ :previous::/test
+ :else:1:/test
+ :current:2:/test/page/2
+ :else:3:/test/page/3
+ :else:4:/test/page/4
+ :else:5:/test/page/5
+ :ellipsis:9:/test/page/9
+ :else:10:/test/page/10
+ :next::/test/page/3
+ :u_prev:/test
+ :u_next:/test/page/3',
),
array(
array('routes' => array(
@@ -135,17 +145,17 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
:per_page:10
:current_page:3
:base_url:
- :previous::test/page/2
- :else:1:test
- :else:2:test/page/2
- :current:3:test/page/3
- :else:4:test/page/4
- :else:5:test/page/5
- :ellipsis:9:test/page/9
- :else:10:test/page/10
- :next::test/page/4
- :u_prev:test/page/2
- :u_next:test/page/4',
+ :previous::/test/page/2
+ :else:1:/test
+ :else:2:/test/page/2
+ :current:3:/test/page/3
+ :else:4:/test/page/4
+ :else:5:/test/page/5
+ :ellipsis:9:/test/page/9
+ :else:10:/test/page/10
+ :next::/test/page/4
+ :u_prev:/test/page/2
+ :u_next:/test/page/4',
),
);
}