getLayout() public method

Returns the layout object.
public getLayout ( ) : Layout
return Phalcon\Paginator\Pager\Layout
Example #1
1
 /**
  * @expectedException \RuntimeException
  * @expectedExceptionMessage Unable to find layout "UnknownLayoutClass"
  */
 public function testGetLayoutMethodShouldWithInvalidLayoutClassShouldThrowException()
 {
     // stub paginate
     $paginate = new stdClass();
     $paginate->total_pages = 20;
     $paginate->current = 1;
     $mock = Mockery::mock(self::BUILDER_CLASS);
     $mock->shouldReceive('getPaginate')->once()->andReturn($paginate);
     $mock->shouldReceive('getLimit')->once()->andReturn(null);
     $pager = new Pager($mock, ['rangeLength' => 5, 'layoutClass' => 'UnknownLayoutClass', 'urlMask' => 'xxx']);
     $pager->getLayout();
 }