/**
  * @cover BreadcrumbService::__construct()
  * @cover BreadcrumbService::getBreadcrumbs()
  * @cover BreadcrumbService::getBreadcrumbView()
  */
 public function testConstructor()
 {
     $link = new BreadcrumbLink(uniqid(), 'bootstrap-bundle-test-route', 'Testlink');
     $breadcrumbService = new BreadcrumbService();
     $this->assertEquals(array(), $breadcrumbService->getBreadcrumbs());
     $this->assertNull($breadcrumbService->getBreadcrumb(uniqid()));
     $breadcrumbService->pushLink($link);
     $breadcrumbView = $breadcrumbService->getBreadcrumbView();
     $this->assertEquals('bootstrap-bundle-test-route', $breadcrumbView[0]->getLink());
     $breadcrumbService = new BreadcrumbService($this->urlGenerator);
     $this->assertEquals(array(), $breadcrumbService->getBreadcrumbs());
     $breadcrumbService->pushLink($link);
     $breadcrumbView = $breadcrumbService->getBreadcrumbView();
     $this->assertNotEquals('bootstrap-bundle-test-route', $breadcrumbView[0]->getLink());
     $this->assertEquals('/this/is/a/test', $breadcrumbView[0]->getLink());
 }
 /**
  * Get the rendered breadcrumb.
  * @param string $breadcrumb_name The name of the used breadcrumb
  * @return string The breadcrumb html.
  */
 public function breadcrumbRender($breadcrumb_name = null)
 {
     $breadcrumb = $this->containerService->getBreadcrumbView($breadcrumb_name);
     return $this->environment->render($this->getTemplateName(), array('breadcrumb' => $breadcrumb ? $breadcrumb->getLinks() : array()));
 }