function menu_test_static_variable in Drupal 7
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()
- MenuRouterTestCase::testMenuItemHooks in modules/
simpletest/ tests/ menu.test - Test menu maintenance hooks.
- menu_test_menu_link_delete in modules/
simpletest/ tests/ menu_test.module - Implements hook_menu_link_delete().
- menu_test_menu_link_insert in modules/
simpletest/ tests/ menu_test.module - Implements hook_menu_link_insert().
- menu_test_menu_link_update in modules/
simpletest/ tests/ menu_test.module - Implements hook_menu_link_update().
File
- modules/
simpletest/ tests/ menu_test.module, line 528 - Dummy module implementing hook menu.
Code
function menu_test_static_variable($value = NULL) {
static $variable;
if (!empty($value)) {
$variable = $value;
}
return $variable;
}