1 menu.test | private MenuTestCase::getStandardMenuLink() |
Get standard menu link.
File
- core/
modules/ menu/ tests/ menu.test, line 594 - Tests for menu.module.
Class
Code
private function getStandardMenuLink() {
// Retrieve menu link id of the Log out menu link, which will always be on the home page.
$mlid = db_query("SELECT mlid FROM {menu_links} WHERE module = 'system' AND router_path = 'user/logout'")->fetchField();
$this->assertTrue($mlid > 0, 'Standard menu link id was found');
// Load menu link.
// Use api function so that link is translated for rendering.
$item = menu_link_load($mlid);
$this->assertTrue((bool) $item, 'Standard menu link was loaded');
return $item;
}