Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (7 years ago)
Author:
SergeyBiryukov
Message:

Docs: Improve inline comments per the documentation standards.

Includes minor code layout fixes for better readability.

See #48303.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/post/nav-menu.php

    r46586 r47122  
    8484                );
    8585
    86                 // Item without menu-item-object arg
     86                // Item without menu-item-object arg.
    8787                $post_2_insert = wp_update_nav_menu_item(
    8888                        $this->menu_id,
     
    143143        function test_orphan_nav_menu_item() {
    144144
    145                 // Create an orphan nav menu item
     145                // Create an orphan nav menu item.
    146146                $custom_item_id = wp_update_nav_menu_item(
    147147                        0,
     
    155155                );
    156156
    157                 // Confirm it saved properly
     157                // Confirm it saved properly.
    158158                $custom_item = wp_setup_nav_menu_item( get_post( $custom_item_id ) );
    159159                $this->assertEquals( 'Wordpress.org', $custom_item->title );
    160160
    161                 // Update the orphan with an associated nav menu
     161                // Update the orphan with an associated nav menu.
    162162                wp_update_nav_menu_item(
    163163                        $this->menu_id,
     
    226226         */
    227227        function test_orderby_name_by_default() {
    228                 // We are going to create a random number of menus (min 2, max 10)
     228                // We are going to create a random number of menus (min 2, max 10).
    229229                $menus_no = rand( 2, 10 );
    230230
     
    233233                }
    234234
    235                 // This is the expected array of menu names
     235                // This is the expected array of menu names.
    236236                $expected_nav_menus_names = wp_list_pluck(
    237237                        get_terms(
     
    245245                );
    246246
    247                 // And this is what we got when calling wp_get_nav_menus()
     247                // And this is what we got when calling wp_get_nav_menus().
    248248                $nav_menus_names = wp_list_pluck( wp_get_nav_menus(), 'name' );
    249249
     
    312312
    313313                $this->assertEquals( $post_type_slug, $post_type_archive_item->title );
    314                 $this->assertEquals( $post_type_description, $post_type_archive_item->description ); //fail!!!
     314                $this->assertEquals( $post_type_description, $post_type_archive_item->description ); // Fail!
    315315        }
    316316
     
    460460                );
    461461
    462                 // The markup should include whitespace between <li>s
     462                // The markup should include whitespace between <li>'s.
    463463                $this->assertRegExp( '/\s<li.*>|<\/li>\s/U', $menu );
    464464                $this->assertNotRegExp( '/<\/li><li.*>/U', $menu );
    465465
    466                 // Whitepsace suppressed.
     466                // Whitespace suppressed.
    467467                $menu = wp_nav_menu(
    468468                        array(
     
    473473                );
    474474
    475                 // The markup should not include whitespace around <li>s
     475                // The markup should not include whitespace around <li>'s.
    476476                $this->assertNotRegExp( '/\s<li.*>|<\/li>\s/U', $menu );
    477477                $this->assertRegExp( '/><li.*>|<\/li></U', $menu );
Note: See TracChangeset for help on using the changeset viewer.