protected function RouteBuilderTest::setUp in Drupal 8
Overrides UnitTestCase::setUp
File
- core/
tests/ Drupal/ Tests/ Core/ Routing/ RouteBuilderTest.php, line 80 - 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
->createMock('Drupal\\Core\\Routing\\MatcherDumperInterface');
$this->lock = $this
->createMock('Drupal\\Core\\Lock\\LockBackendInterface');
$this->dispatcher = $this
->createMock('\\Symfony\\Component\\EventDispatcher\\EventDispatcherInterface');
$this->moduleHandler = $this
->createMock('Drupal\\Core\\Extension\\ModuleHandlerInterface');
$this->controllerResolver = $this
->createMock('Drupal\\Core\\Controller\\ControllerResolverInterface');
$this->yamlDiscovery = $this
->getMockBuilder('\\Drupal\\Core\\Discovery\\YamlDiscovery')
->disableOriginalConstructor()
->getMock();
$this->checkProvider = $this
->createMock('\\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);
}