public function testKit() { $kit = new app\Kit([]); $registry = new app\Registry(); $registry->setKit($kit); $this->assertEquals($kit, $registry->getKit()); }
/** * @return interfaces\Pager */ public function getPager() { if ($this->pager) { return $this->pager; } $stmt = $this->table->makeStmt($this->buildCountQuery($this->getQuery()), $this->getParams()); $stmt->execute(); $row = $stmt->fetch(\PDO::FETCH_NUM); $stmt->closeCursor(); $this->pager = $this->registry->getKit()->makePager($row[0]); return $this->pager; }