Phalcon\Tests\Paginator\PagerTest::testCallingGetPagesInRangeMethodWithDefaultOptionsShouldReturnExpectedArray PHP Method

testCallingGetPagesInRangeMethodWithDefaultOptionsShouldReturnExpectedArray() public method

    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());
    }