public function testCanConstructQueryEngine() { $store = $this->getMockBuilder('\\SMW\\SQLStore\\SQLStore')->disableOriginalConstructor()->getMock(); $connection = $this->getMockBuilder('\\SMW\\MediaWiki\\Database')->disableOriginalConstructor()->getMock(); $store->expects($this->any())->method('getConnection')->will($this->returnValue($connection)); $instance = new QueryEngineFactory($store); $this->assertInstanceOf('\\SMW\\SQLStore\\QueryEngine\\QueryEngine', $instance->newQueryEngine()); }
/** * @since 2.2 * * @return ConceptCache */ public function newMasterConceptCache() { $conceptQueryResolver = new ConceptQueryResolver($this->queryEngineFactory->newQueryEngine()); $conceptQueryResolver->setConceptFeatures($GLOBALS['smwgQConceptFeatures']); $conceptCache = new ConceptCache($this->store, $conceptQueryResolver); $conceptCache->setUpperLimit($GLOBALS['smwgQMaxLimit']); return $conceptCache; }