From e2cca50ba9548fb26f39738caf0ad875afb96bcc Mon Sep 17 00:00:00 2001 From: nate Date: Thu, 8 May 2008 04:01:07 +0000 Subject: [PATCH] Cleaning up code formatting on Paginator helper test, and adding extra test case git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@6768 3807eeeb-6ff5-0310-8944-8be069107fe0 --- .../libs/view/helpers/paginator.test.php | 37 +++++++++++-------- 1 file changed, 21 insertions(+), 16 deletions(-) diff --git a/cake/tests/cases/libs/view/helpers/paginator.test.php b/cake/tests/cases/libs/view/helpers/paginator.test.php index 18572a812..2de80b130 100644 --- a/cake/tests/cases/libs/view/helpers/paginator.test.php +++ b/cake/tests/cases/libs/view/helpers/paginator.test.php @@ -168,28 +168,33 @@ class PaginatorTest extends UnitTestCase { function testOptions() { $this->Paginator->options('myDiv'); $this->assertEqual('myDiv', $this->Paginator->options['update']); - + $this->Paginator->options = array(); $this->Paginator->params = array(); - - $options = array('paging' => array( - 'Article' => array( - 'order' => 'desc', - 'sort' => 'title' - ) - ) - ); + + $options = array('paging' => array('Article' => array( + 'order' => 'desc', + 'sort' => 'title' + ))); $this->Paginator->options($options); - + $expected = array('Article' => array( - 'order' => 'desc', - 'sort' => 'title' - ) - ); + 'order' => 'desc', + 'sort' => 'title' + )); + $this->assertEqual($expected, $this->Paginator->params['paging']); + + $this->Paginator->options = array(); + $this->Paginator->params = array(); + + $options = array('Article' => array( + 'order' => 'desc', + 'sort' => 'title' + )); + $this->Paginator->options($options); $this->assertEqual($expected, $this->Paginator->params['paging']); - } - + function testPagingLinks() { $this->Paginator->params['paging'] = array('Client' => array( 'page' => 1, 'current' => 3, 'count' => 13, 'prevPage' => false, 'nextPage' => true, 'pageCount' => 5,