class MenuTestHelper
Helper class for the menu API tests.
Hierarchy
- class \Drupal\menu_test\MenuTestHelper
Expanded class hierarchy of MenuTestHelper
2 files declare their use of MenuTestHelper
- MenuRouterTest.php in core/
modules/ system/ tests/ src/ Functional/ Menu/ MenuRouterTest.php - MenuTestHooks.php in core/
modules/ system/ tests/ modules/ menu_test/ src/ Hook/ MenuTestHooks.php
File
-
core/
modules/ system/ tests/ modules/ menu_test/ src/ MenuTestHelper.php, line 10
Namespace
Drupal\menu_testView source
final class MenuTestHelper {
/**
* Sets a static variable for the testMenuName() test.
*
* Used to change the menu_name parameter of a menu.
*
* @param string $new_name
* (optional) If set, will change the $menu_name value.
*
* @return string
* The $menu_name value to use.
*/
public static function menuName(string $new_name = '') : string {
static $menu_name = 'original';
if ($new_name) {
$menu_name = $new_name;
}
return $menu_name;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary |
---|---|---|---|
MenuTestHelper::menuName | public static | function | Sets a static variable for the testMenuName() test. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.