function MenuTestHelper::menuName
Sets a static variable for the testMenuName() test.
Used to change the menu_name parameter of a menu.
Parameters
string $new_name: (optional) If set, will change the $menu_name value.
Return value
string The $menu_name value to use.
2 calls to MenuTestHelper::menuName()
- MenuRouterTest::doTestMenuName in core/
modules/ system/ tests/ src/ Functional/ Menu/ MenuRouterTest.php - Tests for menu_name parameter for default menu links.
- MenuTestHooks::menuLinksDiscoveredAlter in core/
modules/ system/ tests/ modules/ menu_test/ src/ Hook/ MenuTestHooks.php - Implements hook_menu_links_discovered_alter().
File
-
core/
modules/ system/ tests/ modules/ menu_test/ src/ MenuTestHelper.php, line 23
Class
- MenuTestHelper
- Helper class for the menu API tests.
Namespace
Drupal\menu_testCode
public static function menuName(string $new_name = '') : string {
static $menu_name = 'original';
if ($new_name) {
$menu_name = $new_name;
}
return $menu_name;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.