示例#1
0
 /**
  * Calculate first result based on page and max-per-page
  */
 protected function calculateFirstResult()
 {
     $maxPerPage = $this->getMaxPerPage();
     $page = $this->getPage();
     $this->query->setFirstResult($maxPerPage * ($page - 1));
 }
示例#2
0
 public function testSetFirstResult()
 {
     $this->searchQuery->expects($this->once())->method('setFirstResult')->with(self::TEST_VALUE);
     $this->query->setFirstResult(self::TEST_VALUE);
 }