1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-30 21:40:43 +02:00

Merge pull request #2919 from Senky/ticket/12852

[ticket/12852] Make get_url_parts handle get variable with no value

* Senky/ticket/12852:
  [ticket/12852] Add unit tests
  [ticket/12852] Add space after if
  [ticket/12852] Remove whitespace
  [ticket/12852] Make get_url_parts handle get variable with no value
This commit is contained in:
Tristan Darricau
2014-09-06 15:47:30 +02:00
2 changed files with 48 additions and 3 deletions

View File

@@ -205,6 +205,18 @@ class phpbb_path_helper_test extends phpbb_test_case
array('test' => 'xyz', 'var' => 'value'),
'test=xyz&var=value',
),
array(
array('test' => null),
'test',
),
array(
array('test' => null, 'var' => null),
'test&var',
),
array(
array('test' => 'xyz', 'var' => null, 'bar' => 'value'),
'test=xyz&var&bar=value',
),
);
}
@@ -254,6 +266,21 @@ class phpbb_path_helper_test extends phpbb_test_case
true,
array('base' => 'mcp.php', 'params' => array('f' => '3')),
),
array(
'index.php?ready',
false,
array('base' => 'index.php', 'params' => array('ready' => null)),
),
array(
'index.php?i=1&ready',
true,
array('base' => 'index.php', 'params' => array('i' => '1', 'ready' => null)),
),
array(
'index.php?ready&i=1',
false,
array('base' => 'index.php', 'params' => array('ready' => null, 'i' => '1')),
),
);
}