function menu_test_static_variable

Static function for testing hook results.

Parameters

$value: The value to set or NULL to return the current value.

Return value

A text string for comparison to test assertions.

4 calls to menu_test_static_variable()
MenuRouterTest::testMenuItemHooks in drupal/core/modules/system/lib/Drupal/system/Tests/Menu/MenuRouterTest.php
Test menu maintenance hooks.
menu_test_menu_link_delete in drupal/core/modules/system/tests/modules/menu_test/menu_test.module
Implements hook_menu_link_delete().
menu_test_menu_link_insert in drupal/core/modules/system/tests/modules/menu_test/menu_test.module
Implements hook_menu_link_insert().
menu_test_menu_link_update in drupal/core/modules/system/tests/modules/menu_test/menu_test.module
Implements hook_menu_link_update().

File

drupal/core/modules/system/tests/modules/menu_test/menu_test.module, line 674
Dummy module implementing hook menu.

Code

function menu_test_static_variable($value = NULL) {
  static $variable;
  if (!empty($value)) {
    $variable = $value;
  }
  return $variable;
}