1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-31 14:00:31 +02:00

[ticket/11334] Allow parameters to be specified in the route

PHPBB3-11334
This commit is contained in:
Joas Schilling
2013-03-15 15:21:15 +01:00
parent 9157095cda
commit 3b0cdc5362
2 changed files with 11 additions and 4 deletions

View File

@@ -15,7 +15,7 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
public function helper_url_data()
{
return array(
// Unsupported: array('foo/bar?t=1&f=2', false, true, false, 'app.php?controller=foo/bar&t=1&f=2', 'parameters in url-argument'),
array('foo/bar?t=1&f=2', false, true, false, 'app.php?t=1&f=2&controller=foo/bar', 'parameters in url-argument'),
array('foo/bar', 't=1&f=2', true, false, 'app.php?controller=foo/bar&t=1&f=2', 'parameters in params-argument using amp'),
array('foo/bar', 't=1&f=2', false, false, 'app.php?controller=foo/bar&t=1&f=2', 'parameters in params-argument using &'),
array('foo/bar', array('t' => 1, 'f' => 2), true, false, 'app.php?controller=foo/bar&t=1&f=2', 'parameters in params-argument as array'),
@@ -24,12 +24,12 @@ class phpbb_controller_helper_url_test extends phpbb_test_case
array('foo/bar', 't=1&f=2', true, 'custom-sid', 'app.php?controller=foo/bar&t=1&f=2&sid=custom-sid', 'using session_id'),
// Testing anchors
// Unsupported: array('foo/bar?t=1&f=2#anchor', false, true, false, 'app.php?controller=foo/bar&t=1&f=2#anchor', 'anchor in url-argument'),
array('foo/bar?t=1&f=2#anchor', false, true, false, 'app.php?t=1&f=2&controller=foo/bar#anchor', 'anchor in url-argument'),
array('foo/bar', 't=1&f=2#anchor', true, false, 'app.php?controller=foo/bar&t=1&f=2#anchor', 'anchor in params-argument'),
array('foo/bar', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'app.php?controller=foo/bar&t=1&f=2#anchor', 'anchor in params-argument (array)'),
// Anchors and custom sid
// Unsupported: array('foo/bar?t=1&f=2#anchor', false, true, 'custom-sid', 'app.php?controller=foo/bar&t=1&f=2&sid=custom-sid#anchor', 'anchor in url-argument using session_id'),
array('foo/bar?t=1&f=2#anchor', false, true, 'custom-sid', 'app.php?t=1&f=2&controller=foo/bar&sid=custom-sid#anchor', 'anchor in url-argument using session_id'),
array('foo/bar', 't=1&f=2#anchor', true, 'custom-sid', 'app.php?controller=foo/bar&t=1&f=2&sid=custom-sid#anchor', 'anchor in params-argument using session_id'),
array('foo/bar', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'app.php?controller=foo/bar&t=1&f=2&sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),