public function testTryToFindAtLeastOneReferenceForProperty() { $idTable = $this->getMockBuilder('\\SMWSql3SmwIds')->disableOriginalConstructor()->getMock(); $tableDefinition = $connection = $this->getMockBuilder('\\SMW\\SQLStore\\TableDefinition')->disableOriginalConstructor()->getMock(); $tableDefinition->expects($this->once())->method('usesIdSubject')->will($this->returnValue(true)); $connection = $this->getMockBuilder('\\SMW\\MediaWiki\\Database')->disableOriginalConstructor()->getMock(); $connection->expects($this->any())->method('selectRow')->will($this->returnValue(false)); $this->store->expects($this->any())->method('getConnection')->will($this->returnValue($connection)); $this->store->expects($this->any())->method('getObjectIds')->will($this->returnValue($idTable)); $this->store->expects($this->any())->method('getPropertyTables')->will($this->returnValue(array($tableDefinition))); $instance = new PropertyTableIdReferenceFinder($this->store); $instance->tryToFindAtLeastOneReferenceForProperty(new DIProperty('Foo')); }