diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2011-08-21 18:56:47 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2011-08-21 18:56:47 +0200 |
commit | 5d66faafc159da90fbbc6d9888b0a6eee9570cd8 (patch) | |
tree | 13023d5c58ebe9a6471a023e74cfa49f283d7f2b /tests/session | |
parent | dc149a43e49c1c2160549e25792c5ee650861e02 (diff) | |
download | forums-5d66faafc159da90fbbc6d9888b0a6eee9570cd8.tar forums-5d66faafc159da90fbbc6d9888b0a6eee9570cd8.tar.gz forums-5d66faafc159da90fbbc6d9888b0a6eee9570cd8.tar.bz2 forums-5d66faafc159da90fbbc6d9888b0a6eee9570cd8.tar.xz forums-5d66faafc159da90fbbc6d9888b0a6eee9570cd8.zip |
[ticket/10321] Add descriptions to the unit tests
PHPBB3-10321
Diffstat (limited to 'tests/session')
-rw-r--r-- | tests/session/append_sid_test.php | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/session/append_sid_test.php b/tests/session/append_sid_test.php index 4a95b2d20e..1a3ad633e3 100644 --- a/tests/session/append_sid_test.php +++ b/tests/session/append_sid_test.php @@ -15,35 +15,35 @@ class phpbb_session_append_sid_test extends phpbb_test_case public function append_sid_data()
{
return array(
- array('viewtopic.php?t=1&f=2', false, true, false, 'viewtopic.php?t=1&f=2'),
- array('viewtopic.php', 't=1&f=2', true, false, 'viewtopic.php?t=1&f=2'),
- array('viewtopic.php', 't=1&f=2', false, false, 'viewtopic.php?t=1&f=2'),
- array('viewtopic.php', array('t' => 1, 'f' => 2), true, false, 'viewtopic.php?t=1&f=2'),
+ array('viewtopic.php?t=1&f=2', false, true, false, 'viewtopic.php?t=1&f=2', 'parameters in url-argument'),
+ array('viewtopic.php', 't=1&f=2', true, false, 'viewtopic.php?t=1&f=2', 'parameters in params-argument using amp'),
+ array('viewtopic.php', 't=1&f=2', false, false, 'viewtopic.php?t=1&f=2', 'parameters in params-argument using &'),
+ array('viewtopic.php', array('t' => 1, 'f' => 2), true, false, 'viewtopic.php?t=1&f=2', 'parameters in params-argument as array'),
// Custom sid parameter
- array('viewtopic.php', 't=1&f=2', true, 'custom-sid', 'viewtopic.php?t=1&f=2&sid=custom-sid'),
+ array('viewtopic.php', 't=1&f=2', true, 'custom-sid', 'viewtopic.php?t=1&f=2&sid=custom-sid', 'using session_id'),
// Testing anchors
- array('viewtopic.php?t=1&f=2#anchor', false, true, false, 'viewtopic.php?t=1&f=2#anchor'),
- array('viewtopic.php', 't=1&f=2#anchor', true, false, 'viewtopic.php?t=1&f=2#anchor'),
- array('viewtopic.php', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'viewtopic.php?t=1&f=2#anchor'),
+ array('viewtopic.php?t=1&f=2#anchor', false, true, false, 'viewtopic.php?t=1&f=2#anchor', 'anchor in url-argument'),
+ array('viewtopic.php', 't=1&f=2#anchor', true, false, 'viewtopic.php?t=1&f=2#anchor', 'anchor in params-argument'),
+ array('viewtopic.php', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, false, 'viewtopic.php?t=1&f=2#anchor', 'anchor in params-argument (array)'),
// Anchors and custom sid
- array('viewtopic.php?t=1&f=2#anchor', false, true, 'custom-sid', 'viewtopic.php?t=1&f=2&sid=custom-sid#anchor'),
- array('viewtopic.php', 't=1&f=2#anchor', true, 'custom-sid', 'viewtopic.php?t=1&f=2&sid=custom-sid#anchor'),
- array('viewtopic.php', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'viewtopic.php?t=1&f=2&sid=custom-sid#anchor'),
+ array('viewtopic.php?t=1&f=2#anchor', false, true, 'custom-sid', 'viewtopic.php?t=1&f=2&sid=custom-sid#anchor', 'anchor in url-argument using session_id'),
+ array('viewtopic.php', 't=1&f=2#anchor', true, 'custom-sid', 'viewtopic.php?t=1&f=2&sid=custom-sid#anchor', 'anchor in params-argument using session_id'),
+ array('viewtopic.php', array('t' => 1, 'f' => 2, '#' => 'anchor'), true, 'custom-sid', 'viewtopic.php?t=1&f=2&sid=custom-sid#anchor', 'anchor in params-argument (array) using session_id'),
// Empty parameters should not append the ?
- array('viewtopic.php', false, true, false, 'viewtopic.php'),
- array('viewtopic.php', '', true, false, 'viewtopic.php'),
- array('viewtopic.php', array(), true, false, 'viewtopic.php'),
+ array('viewtopic.php', false, true, false, 'viewtopic.php', 'no params using bool false'),
+ array('viewtopic.php', '', true, false, 'viewtopic.php', 'no params using empty string'),
+ array('viewtopic.php', array(), true, false, 'viewtopic.php', 'no params using empty array'),
);
}
/**
* @dataProvider append_sid_data
*/
- public function test_append_sid($url, $params, $is_amp, $session_id, $expected)
+ public function test_append_sid($url, $params, $is_amp, $session_id, $expected, $description)
{
$this->assertEquals($expected, append_sid($url, $params, $is_amp, $session_id));
}
|