mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-03-30 21:52:59 +00:00
Adding test to paginator test. Disproves #5582
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@7730 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
c128505a2c
commit
439116fd03
1 changed files with 12 additions and 0 deletions
|
@ -370,6 +370,18 @@ class PaginatorTest extends CakeTestCase {
|
||||||
$result = $this->Paginator->next('Next');
|
$result = $this->Paginator->next('Next');
|
||||||
$this->assertPattern('/\/sort:Client.name\/direction:DESC"/', $result);
|
$this->assertPattern('/\/sort:Client.name\/direction:DESC"/', $result);
|
||||||
|
|
||||||
|
$this->Paginator->params['paging'] = array('Client' => array(
|
||||||
|
'page' => 2, 'current' => 1, 'count' => 13, 'prevPage' => true, 'nextPage' => false, 'pageCount' => 2,
|
||||||
|
'defaults' => array(),
|
||||||
|
'options' => array('page' => 2, 'limit' => 10, 'order' => array(), 'conditions' => array())
|
||||||
|
));
|
||||||
|
$result = $this->Paginator->prev('Prev');
|
||||||
|
$expected = array(
|
||||||
|
'a' => array('href' => '/index/page:1/limit:10'),
|
||||||
|
'Prev',
|
||||||
|
'/a',
|
||||||
|
);
|
||||||
|
$this->assertTags($result, $expected);
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* testGenericLinks method
|
* testGenericLinks method
|
||||||
|
|
Loading…
Add table
Reference in a new issue