function PathMatcherTest::testMatchPath
Tests that standard paths works with multiple patterns.
@dataProvider getMatchPathData
File
-
core/
tests/ Drupal/ Tests/ Core/ Path/ PathMatcherTest.php, line 43
Class
- PathMatcherTest
- @coversDefaultClass \Drupal\Core\Path\PathMatcher[[api-linebreak]] @group Path
Namespace
Drupal\Tests\Core\PathCode
public function testMatchPath($patterns, $paths) {
foreach ($paths as $path => $expected_result) {
$actual_result = $this->pathMatcher
->matchPath($path, $patterns);
$this->assertEquals($actual_result, $expected_result, "Tried matching the path '{$path}' to the pattern '{$patterns}'.");
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.