function RouteBuilderTest::setUpMockMatcherDumper

Reinitializes the matcher dumper as a mock object.

2 calls to RouteBuilderTest::setUpMockMatcherDumper()
RouteBuilderTest::testRebuildWithProviderBasedRoutes in core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
Tests the rebuild with routes provided by a callback.
RouteBuilderTest::testRebuildWithStaticModuleRoutes in core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php
Tests that provided routes by a module is put into the dumper/dispatcher.

File

core/tests/Drupal/Tests/Core/Routing/RouteBuilderTest.php, line 109

Class

RouteBuilderTest
Tests Drupal\Core\Routing\RouteBuilder.

Namespace

Drupal\Tests\Core\Routing

Code

protected function setUpMockMatcherDumper() : void {
  $this->dumper = $this->createMock(MatcherDumperInterface::class);
  $reflection = new \ReflectionProperty($this->routeBuilder, 'dumper');
  $reflection->setValue($this->routeBuilder, $this->dumper);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.