protected function setUp() { $this->dumper = $this->getMock('Drupal\\Core\\Routing\\MatcherDumperInterface'); $this->lock = $this->getMock('Drupal\\Core\\Lock\\LockBackendInterface'); $this->dispatcher = $this->getMock('\\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface'); $this->moduleHandler = $this->getMock('Drupal\\Core\\Extension\\ModuleHandlerInterface'); $this->controllerResolver = $this->getMock('Drupal\\Core\\Controller\\ControllerResolverInterface'); $this->yamlDiscovery = $this->getMockBuilder('\\Drupal\\Component\\Discovery\\YamlDiscovery')->disableOriginalConstructor()->getMock(); $this->routeBuilderIndicator = $this->getMock('\\Drupal\\Core\\Routing\\RouteBuilderIndicatorInterface'); $this->routeBuilder = new TestRouteBuilder($this->dumper, $this->lock, $this->dispatcher, $this->moduleHandler, $this->controllerResolver, $this->routeBuilderIndicator); $this->routeBuilder->setYamlDiscovery($this->yamlDiscovery); }