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:
mark_story 2008-10-10 20:20:44 +00:00
parent c128505a2c
commit 439116fd03

View file

@ -370,6 +370,18 @@ class PaginatorTest extends CakeTestCase {
$result = $this->Paginator->next('Next');
$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