public function testGetPropertyValuesFromCacheForAvailableHash() { $expected = array(new DIWikiPage('Bar', NS_MAIN)); $subject = new DIWikiPage('Foo', NS_MAIN); $this->redirectTargetLookup->expects($this->once())->method('findRedirectTarget')->will($this->returnValue(new DIWikiPage('Bar', NS_MAIN))); $container = $this->getMockBuilder('\\Onoi\\BlobStore\\Container')->disableOriginalConstructor()->getMock(); $container->expects($this->once())->method('has')->will($this->returnValue(true)); $container->expects($this->once())->method('get')->with($this->stringContains('pv:'))->will($this->returnValue($expected)); $this->blobStore->expects($this->once())->method('canUse')->will($this->returnValue(true)); $this->blobStore->expects($this->once())->method('read')->will($this->returnValue($container)); $instance = new CachedEntityLookup($this->entityLookup, $this->redirectTargetLookup, $this->blobStore); $instance->setCachedLookupFeatures(SMW_VL_PV); $this->assertEquals($expected, $instance->getPropertyValues($subject, new DIProperty('Foobar'))); }