| 7 menu.test | private MenuTestCase::getStandardMenuLink() |
| 8 menu.test | private MenuTestCase::getStandardMenuLink() |
Get standard menu link.
File
- modules/
menu/ menu.test, line 519 - Tests for menu.module.
Code
private function getStandardMenuLink() {
// Retrieve menu link id of the Log out menu link, which will always be on the front 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;
}
Login or register to post comments