public function testPositionMethods()
 {
     $node1 = $this->breadcrumbs->add('/', 'index');
     $node2 = $this->breadcrumbs->add('/foo', 'foo');
     $this->assertEquals($node1, $this->breadcrumbs->current());
     $this->assertEquals($node2, $this->breadcrumbs->next());
     $this->assertEquals($node1, $this->breadcrumbs->first());
     $this->assertEquals($node2, $this->breadcrumbs->last());
 }
 public function testRenderCustomBreadcrumbsAndTemplate()
 {
     $breadcrumbsBuilder = $this->getMockBuilder('Yceruto\\Bundle\\BreadcrumbsBundle\\BreadcrumbsBuilder')->disableOriginalConstructor()->getMock();
     $container = new ContainerBuilder();
     $container->setParameter('kernel.debug', false);
     $container->set('breadcrumbs_builder', $breadcrumbsBuilder);
     $extension = new BreadcrumbsExtension();
     $extension->load(array(), $container);
     $breadcrumbs = new Breadcrumbs();
     $breadcrumbs->add('/', 'home');
     /* @var BreadcrumbsBuilder $breadcrumbsBuilder */
     $twigExtension = new TwigBreadcrumbsExtension($breadcrumbsBuilder);
     $loader = new \Twig_Loader_Filesystem();
     $loader->addPath(__DIR__ . '/Fixtures/Resources/BreadcrumbsBundle/views', 'Breadcrumbs');
     $environment = new \Twig_Environment($loader);
     $content = $twigExtension->renderBreadcrumbs($environment, $breadcrumbs);
     $this->assertContains('<ol class="custom-breadcrumb"><li class="active">HOME</li></ol>', $content);
 }