diff options
author | Tristan Darricau <github@nicofuma.fr> | 2014-09-06 15:47:30 +0200 |
---|---|---|
committer | Tristan Darricau <github@nicofuma.fr> | 2014-09-06 15:47:30 +0200 |
commit | 297ab5c5260c37bf4db4f220911b4dc8f4ca2674 (patch) | |
tree | d17f465b423e5a1e1d37c8a85afe425a61b210a8 /tests | |
parent | 6387bf8d1399b9ccf995b8eb5a4b93425d27e873 (diff) | |
parent | 7b796532dfbdccbca9ad66e1e752950e0c9e84b0 (diff) | |
download | forums-297ab5c5260c37bf4db4f220911b4dc8f4ca2674.tar forums-297ab5c5260c37bf4db4f220911b4dc8f4ca2674.tar.gz forums-297ab5c5260c37bf4db4f220911b4dc8f4ca2674.tar.bz2 forums-297ab5c5260c37bf4db4f220911b4dc8f4ca2674.tar.xz forums-297ab5c5260c37bf4db4f220911b4dc8f4ca2674.zip |
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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/path_helper/path_helper_test.php | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/path_helper/path_helper_test.php b/tests/path_helper/path_helper_test.php index 27e94d6a07..3832307897 100644 --- a/tests/path_helper/path_helper_test.php +++ b/tests/path_helper/path_helper_test.php @@ -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')), + ), ); } |