You are here

public function MockMatcher::__construct in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/system/src/Tests/Routing/MockMatcher.php \Drupal\system\Tests\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/src/Tests/Routing/MockMatcher.php, line 29
Contains \Drupal\system\Tests\Routing\MockMatcher.

Class

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

Namespace

Drupal\system\Tests\Routing

Code

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