protected function createMultipleConcepts() { $titleLookup = new TitleLookup($this->store->getConnection('mw.db')); $titleLookup->setNamespace(SMW_NS_CONCEPT); if ($this->endId == 0 && $this->startId == 0) { return $titleLookup->selectAll(); } $endId = $titleLookup->getMaxId(); if ($this->endId > 0) { $endId = min($this->endId, $endId); } return $titleLookup->selectByIdRange($this->startId, $endId); }
public function testSelectByRangeOnMissingNamespaceThrowsException() { $this->setExpectedException('RuntimeException'); $database = $this->getMockBuilder('\\SMW\\MediaWiki\\Database')->disableOriginalConstructor()->getMock(); $instance = new TitleLookup($database); $instance->selectByIdRange(1, 5); }