aboutsummaryrefslogtreecommitdiffstats
path: root/tests/pagination
diff options
context:
space:
mode:
authorCesar G <prototech91@gmail.com>2014-02-03 12:29:40 -0800
committerCesar G <prototech91@gmail.com>2014-02-04 05:55:47 -0800
commit5e1db72532aa58991a9c1d7ddba6bc5dd45ae93c (patch)
tree28874b2a369d264cd7037dcdd20aa3aff83944ec /tests/pagination
parent151c05e92eb5814d492f4739ccf636e7bca4701f (diff)
downloadforums-5e1db72532aa58991a9c1d7ddba6bc5dd45ae93c.tar
forums-5e1db72532aa58991a9c1d7ddba6bc5dd45ae93c.tar.gz
forums-5e1db72532aa58991a9c1d7ddba6bc5dd45ae93c.tar.bz2
forums-5e1db72532aa58991a9c1d7ddba6bc5dd45ae93c.tar.xz
forums-5e1db72532aa58991a9c1d7ddba6bc5dd45ae93c.zip
[ticket/12158] Add test data for 0 items to validate_start() test.
PHPBB3-12158
Diffstat (limited to 'tests/pagination')
-rw-r--r--tests/pagination/pagination_test.php19
1 files changed, 17 insertions, 2 deletions
diff --git a/tests/pagination/pagination_test.php b/tests/pagination/pagination_test.php
index 4e8083b47f..a96466347c 100644
--- a/tests/pagination/pagination_test.php
+++ b/tests/pagination/pagination_test.php
@@ -156,23 +156,38 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
{
return array(
array(
+ 0,
+ 0,
+ 0,
+ ),
+ array(
-1,
+ 20,
+ 0,
+ ),
+ array(
+ 20,
+ -30,
0,
),
array(
0,
+ 20,
0,
),
array(
10,
+ 20,
10,
),
array(
20,
+ 20,
10,
),
array(
30,
+ 20,
10,
),
);
@@ -181,9 +196,9 @@ class phpbb_pagination_pagination_test extends phpbb_template_template_test_case
/**
* @dataProvider validate_start_data
*/
- public function test_validate_start($start, $expect)
+ public function test_validate_start($start, $num_items, $expect)
{
- $this->assertEquals($expect, $this->pagination->validate_start($start, 10, 20));
+ $this->assertEquals($expect, $this->pagination->validate_start($start, 10, $num_items));
}
public function reverse_start_data()