Skip to content

Commit

Permalink
Added a testcase for to show that the first option has also the sam…
Browse files Browse the repository at this point in the history
…e bug.
  • Loading branch information
Xety committed Dec 14, 2015
1 parent c8d3cea commit 9949fa9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions tests/TestCase/View/Helper/PaginatorHelperTest.php
Expand Up @@ -1165,6 +1165,24 @@ public function testNumbers()
];
$this->assertHtml($expected, $result);

$result = $this->Paginator->numbers(['first' => '8', 'last' => '8']);
$expected = [
['li' => ['class' => 'first']], ['a' => ['href' => '/index']], '8', '/a', '/li',
['li' => ['class' => 'ellipsis']], '...', '/li',
['li' => []], ['a' => ['href' => '/index?page=4']], '4', '/a', '/li',
['li' => []], ['a' => ['href' => '/index?page=5']], '5', '/a', '/li',
['li' => []], ['a' => ['href' => '/index?page=6']], '6', '/a', '/li',
['li' => []], ['a' => ['href' => '/index?page=7']], '7', '/a', '/li',
['li' => ['class' => 'active']], '<a href=""', '8', '/a', '/li',
['li' => []], ['a' => ['href' => '/index?page=9']], '9', '/a', '/li',
['li' => []], ['a' => ['href' => '/index?page=10']], '10', '/a', '/li',
['li' => []], ['a' => ['href' => '/index?page=11']], '11', '/a', '/li',
['li' => []], ['a' => ['href' => '/index?page=12']], '12', '/a', '/li',
['li' => ['class' => 'ellipsis']], '...', '/li',
['li' => ['class' => 'last']], ['a' => ['href' => '/index?page=15']], '8', '/a', '/li',
];
$this->assertHtml($expected, $result);

$this->Paginator->request->params['paging'] = [
'Client' => [
'page' => 1,
Expand Down

0 comments on commit 9949fa9

Please sign in to comment.