getLimit() public method

Get current rows limit (if provided)
public getLimit ( ) : integer | null
return integer | null
Beispiel #1
0
 public function testCallingGetPagesInRangeMethodWithDefaultOptionsShouldReturnExpectedArray()
 {
     // stub paginate
     $paginate = new stdClass();
     $paginate->total_pages = 20;
     $paginate->current = 5;
     $paginate->last = 20;
     $mock = Mockery::mock(self::BUILDER_CLASS);
     $mock->shouldReceive('getPaginate')->once()->andReturn($paginate);
     $mock->shouldReceive('getLimit')->once()->andReturn(null);
     $pager = new Pager($mock);
     $this->assertEquals([1, 2, 3, 4, 5, 6, 7, 8, 9, 10], $pager->getPagesInRange());
     $this->assertEquals(null, $pager->getLimit());
 }