public function testBreadcrumb() { $breadcrumb = $this->navigation->getBreadcrumb($this->data['news/news-2']->getUuid(), 'sulu_io', 'en', 1); $this->assertEquals(3, count($breadcrumb)); // startpage has no title $this->assertEquals('Homepage', $breadcrumb[0]->getTitle()); $this->assertEquals('/', $breadcrumb[0]->getUrl()); $this->assertEquals('News', $breadcrumb[1]->getTitle()); $this->assertEquals('/news', $breadcrumb[1]->getUrl()); $this->assertEquals('News-2', $breadcrumb[2]->getTitle()); $this->assertEquals('/news/news-2', $breadcrumb[2]->getUrl()); }
/** * {@inheritdoc} */ public function breadcrumbFunction($uuid) { $webspaceKey = $this->requestAnalyzer->getWebspace()->getKey(); $locale = $this->requestAnalyzer->getCurrentLocalization()->getLocalization(); return $this->navigationMapper->getBreadcrumb($uuid, $webspaceKey, $locale); }