function getCurrentPage($currentPage = 1) { parent::getCurrentPage($this->pageCount); if ($this->currentPage > $this->pageCount) { $this->currentPage = $this->pageCount; } }
public function testUnavailablePage() { $pager = new Pager(27); $pager->setPageSize(4)->setCurrentPage(10); $this->assertEquals(0, $pager->getOffset()); $this->assertEquals(1, $pager->getCurrentPage()); }