|
@@ -2780,31 +2780,31 @@ class PaginatorHelperTest extends TestCase
|
|
|
$this->Paginator->request = $this->Paginator->request->withParam('paging', [
|
|
$this->Paginator->request = $this->Paginator->request->withParam('paging', [
|
|
|
'Client' => [
|
|
'Client' => [
|
|
|
'page' => 1523,
|
|
'page' => 1523,
|
|
|
- 'current' => 1230,
|
|
|
|
|
- 'count' => 234567,
|
|
|
|
|
|
|
+ 'current' => 3000,
|
|
|
|
|
+ 'count' => 4800001,
|
|
|
'perPage' => 3000,
|
|
'perPage' => 3000,
|
|
|
'prevPage' => false,
|
|
'prevPage' => false,
|
|
|
'nextPage' => true,
|
|
'nextPage' => true,
|
|
|
- 'pageCount' => 1000,
|
|
|
|
|
|
|
+ 'pageCount' => 1600,
|
|
|
'limit' => 5000,
|
|
'limit' => 5000,
|
|
|
'sort' => 'Client.name',
|
|
'sort' => 'Client.name',
|
|
|
'order' => 'DESC',
|
|
'order' => 'DESC',
|
|
|
'start' => 4566001,
|
|
'start' => 4566001,
|
|
|
- 'end' => 234567,
|
|
|
|
|
|
|
+ 'end' => 4569001,
|
|
|
]
|
|
]
|
|
|
]);
|
|
]);
|
|
|
|
|
|
|
|
$input = 'Page {{page}} of {{pages}}, showing {{current}} records out of {{count}} total, ';
|
|
$input = 'Page {{page}} of {{pages}}, showing {{current}} records out of {{count}} total, ';
|
|
|
$input .= 'starting on record {{start}}, ending on {{end}}';
|
|
$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);
|
|
$result = $this->Paginator->counter($input);
|
|
|
$this->assertEquals($expected, $result);
|
|
$this->assertEquals($expected, $result);
|
|
|
|
|
|
|
|
I18n::setLocale('de-DE');
|
|
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);
|
|
$result = $this->Paginator->counter($input);
|
|
|
$this->assertEquals($expected, $result);
|
|
$this->assertEquals($expected, $result);
|
|
|
}
|
|
}
|