/** * {@inheritdoc} * * @covers ::__construct() */ public function setUp() { parent::setUp(); $this->requestMatcher = $this->getMock('\\Symfony\\Component\\Routing\\Matcher\\RequestMatcherInterface'); $config_factory = $this->getConfigFactoryStub(array('system.site' => array('front' => 'test_frontpage'))); $this->pathProcessor = $this->getMock('\\Drupal\\Core\\PathProcessor\\InboundPathProcessorInterface'); $this->context = $this->getMock('\\Symfony\\Component\\Routing\\RequestContext'); $this->accessManager = $this->getMockBuilder('\\Drupal\\Core\\Access\\AccessManager')->disableOriginalConstructor()->getMock(); $this->titleResolver = $this->getMock('\\Drupal\\Core\\Controller\\TitleResolverInterface'); $this->currentUser = $this->getMock('Drupal\\Core\\Session\\AccountInterface'); $this->builder = new TestPathBasedBreadcrumbBuilder($this->context, $this->accessManager, $this->requestMatcher, $this->pathProcessor, $config_factory, $this->titleResolver, $this->currentUser); $this->builder->setStringTranslation($this->getStringTranslationStub()); $this->linkGenerator = $this->getMock('Drupal\\Core\\Utility\\LinkGeneratorInterface'); $this->builder->setLinkGenerator($this->linkGenerator); }