Example #1
0
 public function testPagiationCreateLinks()
 {
     $pagination = new Pagination();
     $pagination->setTotalNumberOfPage(6);
     $pagination->setPerPage(2);
     $this->assertNotNull($pagination->createLinks());
     $this->assertEquals(trim("<div class='pagination'><span class='disabled'> previous</span><span class='current'>1</span><a href='http://localhost/cygnite/index.php/user/index/2'>2</a><a href='http://localhost/cygnite/index.php/user/index/3'>3</a><a href='http://localhost/cygnite/index.php/user/index/2'>next </a></div>"), trim($pagination->createLinks()));
 }
Example #2
0
 /**
  * Set the pagination limit
  *
  * @param null $number
  */
 public function setPageLimit($number = null)
 {
     if (is_null($number)) {
         $number = $this->setPageLimit();
     }
     $pagination = Pagination::make();
     $pagination->setPerPage($number);
 }