Conditions | 1 |
Paths | 1 |
Total Lines | 40 |
Code Lines | 29 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
29 | public function pageGenerationData() { |
||
30 | // One partial available page. |
||
31 | $one = static::ITEMS_PER_PAGE; |
||
32 | // Part of one page. |
||
33 | $partial = floor($one * 0.6); |
||
34 | // More than one available page |
||
35 | $oneplus = $one + $partial; |
||
36 | // Exactly two pages. |
||
37 | $two = $one * 2; |
||
38 | $twoplus = $two + $partial; |
||
39 | |||
40 | $expectations = [ |
||
41 | // page, count, result |
||
42 | [-1, 0, 0], |
||
43 | [-1, $partial, 0], |
||
44 | [-1, $one, 0], |
||
45 | [-1, $oneplus, 0], |
||
46 | [-1, $two, 0], |
||
47 | |||
48 | [ 0, 0, 0], |
||
49 | [ 0, $partial, 0], |
||
50 | [ 0, $one, 0], |
||
51 | [ 0, $oneplus, 0], |
||
52 | [ 0, $two, 0], |
||
53 | |||
54 | [ 1, 0, 0], |
||
55 | [ 1, $partial, 0], |
||
56 | [ 1, $one, 0], |
||
57 | [ 1, $oneplus, 1], |
||
58 | [ 1, $two, 1], |
||
59 | |||
60 | [ 2, 0, 0], |
||
61 | [ 2, $partial, 0], |
||
62 | [ 2, $one, 0], |
||
63 | [ 2, $oneplus, 1], |
||
64 | [ 2, $two, 1], |
||
65 | [ 2, $twoplus, 2], |
||
66 | ]; |
||
67 | return $expectations; |
||
68 | } |
||
69 | } |
||
70 |