1 menu_test.module menu_test_init()

Implements hook_init().

File

core/modules/simpletest/tests/menu_test.module, line 396
Dummy module implementing hook menu.

Code

function menu_test_init() {
  // When requested by one of the MenuTrailTestCase tests, record the initial
  // active trail during Backdrop's bootstrap (before the user is redirected to
  // a custom 403 or 404 page). See menu_test_custom_403_404_callback().
  if (state_get('menu_test_record_active_trail', FALSE)) {
    state_set('menu_test_active_trail_initial', menu_get_active_trail());
  }

  // Set string overrides to be used in MenuRouterTestCase.
  $string_overrides = array(
    'Example title - Case 1' => 'Alternative example title - Case 1',
    'Example @sub1 - Case @op2' => 'Alternative example @sub1 - Case @op2',
    'Example title' => 'Alternative example title',
    'Example title' => 'Alternative example title',
  );
  $GLOBALS['settings']['locale_custom_strings_en'] = array('' => $string_overrides);
  backdrop_static_reset('t');
}