protected function MenuTrailByPathActiveTrailHtmlClassTest::menuUrlBasePath in Menu Trail By Path 8
Helper for getting the base: "link_path" that assertMenuActiveTrail expects.
Parameters
$name:
Return value
string
File
- tests/
src/ Functional/ MenuTrailByPathActiveTrailHtmlClassTest.php, line 281
Class
- MenuTrailByPathActiveTrailHtmlClassTest
- Tests that the menu links have the correct css-classes.
Namespace
Drupal\Tests\menu_trail_by_path\FunctionalCode
protected function menuUrlBasePath($name) {
$url = $this->menuUrls[$name];
return '/' . preg_replace('/^' . preg_quote(base_path(), '/') . '/', '', $url
->toString());
}