public function PathMatcherTest::testMatchPath in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php \Drupal\Tests\Core\Path\PathMatcherTest::testMatchPath()
Test that standard paths works with multiple patterns.
@dataProvider getMatchPathData
File
- core/
tests/ Drupal/ Tests/ Core/ Path/ PathMatcherTest.php, line 48 - Contains \Drupal\Tests\Core\Path\PathMatcherTest.
Class
- PathMatcherTest
- @coversDefaultClass \Drupal\Core\Path\PathMatcher @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}'.");
}
}