/**
  * @dataProvider titleProvider
  */
 public function testFindParentBreadcrumbs($title, $count, $expected)
 {
     $subject = DIWikiPage::newFromTitle(Title::newFromText($title));
     $instance = new BySubpageLinksFinder();
     $instance->setSubpageDiscoverySupportState(true);
     $this->assertEmpty($instance->getParents());
     $instance->tryToFindLinksFor($subject);
     $this->assertCount($count, $instance->getParents());
     $this->assertEquals($expected, $instance->getParents());
 }
 private function tryToUseSubpageHierarchyFallback($subject, $parents)
 {
     if ($parents !== array() || !$this->bySubpageLinksFinder->canUseSubpageDiscoveryForFallback()) {
         return $parents;
     }
     $this->bySubpageLinksFinder->tryToFindLinksFor($subject);
     return $this->bySubpageLinksFinder->getParents();
 }