commit 7fab1056d97b7805b4bfc16ad1585f926ba0a3bd Author: John Shortess Date: Tue Mar 27 23:15:49 2012 -0400 1326672-34 diff --git a/core/modules/menu/menu.admin.inc b/core/modules/menu/menu.admin.inc index fa1494c..81e5873 100644 --- a/core/modules/menu/menu.admin.inc +++ b/core/modules/menu/menu.admin.inc @@ -548,6 +548,9 @@ function menu_custom_delete_submit($form, &$form_state) { * @param $menu * An array representing the custom menu. * + * @return array + * A renderable array. + * * @see menu_menu() */ function menu_delete_menu_page($menu) { @@ -679,6 +682,9 @@ function menu_edit_menu_submit($form, &$form_state) { * @param $item * An array representing the menu link. * + * @return aray + * A renderable array. + * * @see menu_menu() */ function menu_item_delete_page($item) { diff --git a/core/modules/menu/menu.module b/core/modules/menu/menu.module index e0122bb..cc0adb4 100644 --- a/core/modules/menu/menu.module +++ b/core/modules/menu/menu.module @@ -316,8 +316,6 @@ function menu_save($menu) { * - description: The custom menu description. * * @see menu_load() - * - */ function menu_delete($menu) { // Delete all links from the menu. @@ -656,7 +654,7 @@ function menu_node_prepare($node) { 'customized' => 0, ); } - // Finds the depth limit for the parent select. + // Find the depth limit for the parent select. if (!isset($node->menu['parent_depth_limit'])) { $node->menu['parent_depth_limit'] = _menu_parent_depth_limit($node->menu); } diff --git a/core/modules/menu/menu.test b/core/modules/menu/menu.test index 5c73857..4022e27 100644 --- a/core/modules/menu/menu.test +++ b/core/modules/menu/menu.test @@ -6,25 +6,29 @@ */ /** - * Represents a test case for menu administration. + * Provides tests for menu administration. */ class MenuTestCase extends DrupalWebTestCase { /** * Requires Standard profile modules/dependencies. */ protected $profile = 'standard'; + /** * A user with various administrative privileges. */ protected $big_user; + /** * A user with no administrative privileges. */ protected $std_user; + /** * An array representing a menu. */ protected $menu; + /** * An array of menu items. */ @@ -38,9 +42,6 @@ class MenuTestCase extends DrupalWebTestCase { ); } - /** - * Implements DrupalWebTestCase::setUp(). - */ function setUp() { parent::setUp('menu'); // Create users. @@ -49,8 +50,7 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Logs in users, adds menus and menu links, and tests menu functionality - * through the admin and user interfaces. + * Tests menu functionality through the admin and user interfaces. */ function testMenu() { // Login the user. @@ -99,7 +99,6 @@ class MenuTestCase extends DrupalWebTestCase { /** * Tests standard menu functionality the using navigation menu. - * */ function doStandardMenuTests() { $this->doMenuTests(); @@ -108,7 +107,6 @@ class MenuTestCase extends DrupalWebTestCase { /** * Tests custom menu functionality using the navigation menu. - * */ function doCustomMenuTests() { $this->menu = $this->addCustomMenu(); @@ -305,7 +303,7 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Adds a menu link using the menu module UI. + * Adds a menu link using the Menu module UI. * * @param integer $plid * The parent menu link ID. @@ -364,7 +362,7 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Verifies a menu link using the menu module UI. + * Verifies a menu link using the Menu module UI. * * @param array $item * The menu link. @@ -403,7 +401,7 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Changes the parent of a menu link using the menu module UI. + * Changes the parent of a menu link using the Menu module UI. * * @param $item * The menu link. @@ -423,7 +421,7 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Modifies a menu link using the menu module UI. + * Modifies a menu link using the Menu module UI. * * @param array $item * A menu link passed by reference. @@ -447,12 +445,12 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Resets a standard menu link using the menu module UI. + * Resets a standard menu link using the Menu module UI. * * @param array $item * The menu link. * @param string $old_title - * Original title for menu link. + * Original title for the menu link. */ function resetMenuLink($item, $old_title) { $mlid = $item['mlid']; @@ -470,7 +468,7 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Deletes a menu link using the menu module UI. + * Deletes a menu link using the Menu module UI. * * @param array $item * The menu link. @@ -540,11 +538,10 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Fetches the menu item from the database and compares it to the specified - * array. + * Gets a menu item from the database and compares it to the specified array. * * @param $mlid - * The menu item id. + * The menu item ID. * @param $item * An array containing properties to verify. */ @@ -581,8 +578,7 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Verifies that the logged in user has the desired access to the various menu - * nodes. + * Verifies that the user has the desired access to the various menu nodes. * * @param integer $response * An HTTP response code. @@ -634,13 +630,11 @@ class MenuTestCase extends DrupalWebTestCase { } /** - * Represents a test case for menu settings for nodes. + * Tests menu settings for nodes. */ class MenuNodeTestCase extends DrupalWebTestCase { protected $profile = 'standard'; - /** - * Returns information about the menu node tests. - */ + public static function getInfo() { return array( 'name' => 'Menu settings for nodes', @@ -649,9 +643,6 @@ class MenuNodeTestCase extends DrupalWebTestCase { ); } - /** - * Implements DrupalWebTestCase::setUp(). - */ function setUp() { parent::setUp('menu'); @@ -667,7 +658,7 @@ class MenuNodeTestCase extends DrupalWebTestCase { } /** - * Tests creating, editing, deleting menu links via node form widget. + * Tests creating, editing, and deleting menu links via node form widget. */ function testMenuNodeFormWidget() { // Enable Navigation menu as available menu.