You are here

function i18nMenuTestCase::createMenu in Internationalization 7

Helper function to create a menu.

4 calls to i18nMenuTestCase::createMenu()
i18nMenuTestCase::testMenuTranslateLocalize in i18n_menu/i18n_menu.test
i18nMenuTestCase::testMenuTranslateLocalizeSwitchToNonTranslatable in i18n_menu/i18n_menu.test
Tests if on a switch from translatable to non translatable the translation sets and links are cleaned up.
i18nMenuTestCase::testMenuTranslationSets in i18n_menu/i18n_menu.test
Tests if the translation set management works.
i18nMenuTestCase::testNodeMenuItems in i18n_menu/i18n_menu.test
Test menu items for nodes.

File

i18n_menu/i18n_menu.test, line 254
Test case for multilingual menus.

Class

i18nMenuTestCase
@file Test case for multilingual menus.

Code

function createMenu($edit = array()) {
  $edit += array(
    'title' => $this
      ->randomName(),
    'menu_name' => substr(hash('sha256', $this
      ->randomName(16)), 0, MENU_MAX_MENU_NAME_LENGTH_UI),
    'language' => $this->secondary_language,
  );
  $this
    ->drupalPost('admin/structure/menu/add', $edit, t('Save'));
  return menu_load('menu-' . $edit['menu_name']);
}