function MenuTranslationHierarchyBaseTestCase::createMenuLink in Language Hierarchy 7
Helper function to create a menu link.
1 call to MenuTranslationHierarchyBaseTestCase::createMenuLink()
- MenuTranslationHierarchyWebTestCase::testMenuTranslateLocalize in modules/
i18n_menu_hierarchy/ tests/ i18n_menu_hierarchy.test
File
- modules/
i18n_menu_hierarchy/ tests/ i18n_menu_hierarchy.test, line 45 - Tests for Menu Translation Hierarchy module.
Class
- MenuTranslationHierarchyBaseTestCase
- Base class for Menu Translation Hierarchy module tests.
Code
function createMenuLink($item = array()) {
// Set defaults.
// Note: default language is 'und'.
$item += array(
'link_title' => $this
->randomName(),
'link_path' => '<front>',
'customized' => TRUE,
);
return menu_link_load(menu_link_save($item));
}