/** * 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)); }
public function testSetFirstResult() { $this->searchQuery->expects($this->once())->method('setFirstResult')->with(self::TEST_VALUE); $this->query->setFirstResult(self::TEST_VALUE); }