function PathMatcherTest::setUp

Same name and namespace in other branches
  1. 9 core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php \Drupal\Tests\Core\Path\PathMatcherTest::setUp()
  2. 8.9.x core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php \Drupal\Tests\Core\Path\PathMatcherTest::setUp()
  3. 11.x core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php \Drupal\Tests\Core\Path\PathMatcherTest::setUp()

Overrides UnitTestCase::setUp

File

core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php, line 26

Class

PathMatcherTest
@coversDefaultClass \Drupal\Core\Path\PathMatcher[[api-linebreak]] @group Path

Namespace

Drupal\Tests\Core\Path

Code

protected function setUp() : void {
  parent::setUp();
  // Create a stub config factory with all config settings that will be
  // checked during this test.
  $config_factory_stub = $this->getConfigFactoryStub([
    'system.site' => [
      'page.front' => '/dummy',
    ],
  ]);
  $route_match = $this->createMock('Drupal\\Core\\Routing\\RouteMatchInterface');
  $this->pathMatcher = new PathMatcher($config_factory_stub, $route_match);
}

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