/**
  * @param TermTaxonomy $termTaxonomy A term taxonomy instance
  * @param string       $type         The link type. Can be "category" or "tag"
  *
  * @return string
  */
 public function getTermLink(TermTaxonomy $termTaxonomy, $type = 'category')
 {
     $prefix = ($prefix = $this->optionManager->findOneByOptionName($type . '_base')) ? $prefix->getValue() : null;
     $output = [$termTaxonomy->getTerm()->getSlug()];
     while ($parent = $termTaxonomy->getParent()) {
         $output[] = $parent->getSlug();
         $termTaxonomy = $parent;
     }
     return ($prefix ? $prefix : '') . '/' . implode('/', array_reverse($output)) . (count($output) ? '/' : '');
 }
 /**
  * @param string $sidebarName
  *
  * @return bool
  */
 public function isActiveSidebar($sidebarName)
 {
     return $this->optionManager->isActiveSidebar($sidebarName);
 }
 /**
  * Test that the repository is called with the correct argument.
  */
 public function testFindOneByName()
 {
     $this->repository->expects($this->once())->method('findOneBy')->with($this->equalTo(['name' => 'test']));
     $this->manager->findOneByOptionName('test');
 }