From abc6a28ecaac6b74972408ae1aceaf39b77725ca Mon Sep 17 00:00:00 2001 From: mark_story Date: Mon, 20 Dec 2010 14:02:12 -0500 Subject: [PATCH] Increasing code coverage. --- .../cases/libs/view/helpers/paginator.test.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/cake/tests/cases/libs/view/helpers/paginator.test.php b/cake/tests/cases/libs/view/helpers/paginator.test.php index 2bad399f492..b0c5ae18c89 100644 --- a/cake/tests/cases/libs/view/helpers/paginator.test.php +++ b/cake/tests/cases/libs/view/helpers/paginator.test.php @@ -2231,4 +2231,17 @@ function testQuerystringNextAndPrev() { $this->assertTags($result, $expected); } +/** + * test the current() method + * + * @return void + */ + function testCurrent() { + $result = $this->Paginator->current(); + $this->assertEquals($this->Paginator->request->params['paging']['Article']['page'], $result); + + $result = $this->Paginator->current('Incorrect'); + $this->assertEquals(1, $result); + } + }