function PathMatcherTest::setUp

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php \Drupal\Tests\Core\Path\PathMatcherTest::setUp()
  2. 10 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 24

Class

PathMatcherTest
@coversDefaultClass \Drupal\Core\Path\PathMatcher @group Path

Namespace

Drupal\Tests\Core\Path

Code

protected function setUp() : void {
    // 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.