1 system.test | MenuBlockTestCase::testCustomMenuBlocks() |
Test Menu Block functionality with custom menu.
File
- core/
modules/ system/ tests/ system.test, line 2893 - Tests for system.module.
Class
- MenuBlockTestCase
- Test menu block settings.
Code
function testCustomMenuBlocks() {
// Add a new custom menu.
$menu_name = substr(hash('sha256', $this->randomName(16)), 0, MENU_MAX_MENU_NAME_LENGTH_UI);
$title = $this->randomName(16);
$menu = array(
'menu_name' => $menu_name,
'title' => $title,
'description' => 'Description text',
);
menu_save($menu);
$this->doMenuBlockTests($menu_name, $title);
}