/**
  * @param EntityId $entityId
  * @param string $propertyLabelOrId property label or ID (pXXX)
  * @param int[]|null $acceptableRanks
  *
  * @throws PropertyLabelNotResolvedException
  * @return string
  */
 public function render(EntityId $entityId, $propertyLabelOrId, array $acceptableRanks = null)
 {
     try {
         $entity = $this->entityLookup->getEntity($entityId);
     } catch (RevisionedUnresolvedRedirectException $ex) {
         return '';
     }
     if (!$entity instanceof StatementListProvider) {
         return '';
     }
     $propertyId = $this->propertyIdResolver->resolvePropertyId($propertyLabelOrId, $this->language->getCode());
     $snaks = $this->snaksFinder->findSnaks($entity, $propertyId, $acceptableRanks);
     return $this->formatSnaks($snaks);
 }
 /**
  * @dataProvider findSnaksProvider
  */
 public function testFindSnaks(array $expected, StatementListProvider $statementListProvider, PropertyId $propertyId, array $acceptableRanks = null)
 {
     $snaksFinder = new SnaksFinder();
     $snakList = $snaksFinder->findSnaks($statementListProvider, $propertyId, $acceptableRanks);
     $this->assertEquals($expected, $snakList);
 }