protected function RouteBuilderTest::setUp in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php \Drupal\Tests\Core\Routing\RouteBuilderTest::setUp()
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Routing/ RouteBuilderTest.php, line 79 - Contains \Drupal\Tests\Core\Routing\RouteBuilderTest.
Class
- RouteBuilderTest
- @coversDefaultClass \Drupal\Core\Routing\RouteBuilder @group Routing
Namespace
Drupal\Tests\Core\RoutingCode
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->checkProvider = $this
->getMock('\\Drupal\\Core\\Access\\CheckProviderInterface');
$this->routeBuilder = new TestRouteBuilder($this->dumper, $this->lock, $this->dispatcher, $this->moduleHandler, $this->controllerResolver, $this->checkProvider);
$this->routeBuilder
->setYamlDiscovery($this->yamlDiscovery);
}