public function testDeleteConceptCache() { $connection = $this->getMockBuilder('\\SMW\\MediaWiki\\Database')->disableOriginalConstructor()->getMock(); $connection->expects($this->any())->method('selectRow')->will($this->returnValue(false)); $connection->expects($this->once())->method('delete'); $connectionManager = $this->getMockBuilder('\\SMW\\ConnectionManager')->disableOriginalConstructor()->getMock(); $connectionManager->expects($this->atLeastOnce())->method('getConnection')->will($this->returnValue($connection)); $store = new \SMWSQLStore3(); $store->setConnectionManager($connectionManager); $conceptQueryResolver = $this->getMockBuilder('\\SMW\\SQLStore\\QueryEngine\\ConceptQueryResolver')->disableOriginalConstructor()->getMock(); $instance = new ConceptCache($store, $conceptQueryResolver); $instance->deleteConceptCache(Title::newFromText('Foo', SMW_NS_CONCEPT)); }