Example #1
0
 /**
  * @dataProvider getPageLinks
  *
  * @param string|callback $page_link
  */
 public function testGetPrev($page_link)
 {
     $this->config->expects($this->atLeastOnce())->method('getCurrentPage')->will($this->returnValue(5));
     $this->config->expects($this->never())->method('getFirstPageLink')->will($this->returnValue(''));
     $this->config->expects($this->atLeastOnce())->method('getPageLink')->will($this->returnValue($page_link));
     $node = $this->view->getPrev();
     $this->assertInstanceOf(Node::class, $node);
     $this->assertEquals(4, $node->getPage());
     $this->assertEquals($this->getLink($page_link, 4), $node->getLink());
 }