function MockMatcher::__construct

Same name in other branches
  1. 8.9.x core/modules/system/tests/src/Functional/Routing/MockMatcher.php \Drupal\Tests\system\Functional\Routing\MockMatcher::__construct()
  2. 10 core/modules/system/tests/src/Functional/Routing/MockMatcher.php \Drupal\Tests\system\Functional\Routing\MockMatcher::__construct()
  3. 11.x core/modules/system/tests/src/Functional/Routing/MockMatcher.php \Drupal\Tests\system\Functional\Routing\MockMatcher::__construct()

Constructs a MockMatcher object.

Parameters

\Closure $matcher: An anonymous function that will be used for the matchRequest() method.

File

core/modules/system/tests/src/Functional/Routing/MockMatcher.php, line 24

Class

MockMatcher
A mock matcher that can be configured with any matching logic for testing.

Namespace

Drupal\Tests\system\Functional\Routing

Code

public function __construct(\Closure $matcher) {
    $this->matcher = $matcher;
}

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