From 439116fd03c83d3066d06ad58433f956dfab93ca Mon Sep 17 00:00:00 2001 From: mark_story Date: Fri, 10 Oct 2008 20:20:44 +0000 Subject: [PATCH] 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 --- .../tests/cases/libs/view/helpers/paginator.test.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cake/tests/cases/libs/view/helpers/paginator.test.php b/cake/tests/cases/libs/view/helpers/paginator.test.php index a815ca086..5733d7273 100644 --- a/cake/tests/cases/libs/view/helpers/paginator.test.php +++ b/cake/tests/cases/libs/view/helpers/paginator.test.php @@ -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