Skip to content
Permalink
Browse files

Use more sane example values.

  • Loading branch information...
dereuromark committed Jun 7, 2018
1 parent 80e813a commit b81e221287c50e624a687607fe692e23ea17e4d7
Showing with 8 additions and 8 deletions.
  1. +8 −8 tests/TestCase/View/Helper/PaginatorHelperTest.php
@@ -2780,31 +2780,31 @@ public function testCounterBigNumbers()
$this->Paginator->request = $this->Paginator->request->withParam('paging', [
'Client' => [
'page' => 1523,
'current' => 1230,
'count' => 234567,
'current' => 3000,
'count' => 4800001,
'perPage' => 3000,
'prevPage' => false,
'nextPage' => true,
'pageCount' => 1000,
'pageCount' => 1600,
'limit' => 5000,
'sort' => 'Client.name',
'order' => 'DESC',
'start' => 4566001,
'end' => 234567,
'end' => 4569001,
]
]);
$input = 'Page {{page}} of {{pages}}, showing {{current}} records out of {{count}} total, ';
$input .= 'starting on record {{start}}, ending on {{end}}';
$expected = 'Page 1,523 of 1,000, showing 1,230 records out of 234,567 total, ';
$expected .= 'starting on record 4,566,001, ending on 234,567';
$expected = 'Page 1,523 of 1,600, showing 3,000 records out of 4,800,001 total, ';
$expected .= 'starting on record 4,566,001, ending on 4,569,001';
$result = $this->Paginator->counter($input);
$this->assertEquals($expected, $result);
I18n::setLocale('de-DE');
$expected = 'Page 1.523 of 1.000, showing 1.230 records out of 234.567 total, ';
$expected .= 'starting on record 4.566.001, ending on 234.567';
$expected = 'Page 1.523 of 1.600, showing 3.000 records out of 4.800.001 total, ';
$expected .= 'starting on record 4.566.001, ending on 4.569.001';
$result = $this->Paginator->counter($input);
$this->assertEquals($expected, $result);
}

0 comments on commit b81e221

Please sign in to comment.
You can’t perform that action at this time.