Make WordPress Core


Ignore:
Timestamp:
01/29/2020 12:43:23 AM (5 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/adminbar.php

    r46678 r47122  
    100100        $node_edit_profile = $wp_admin_bar->get_node( 'edit-profile' );
    101101
    102         // Site menu points to the home page instead of the admin URL
     102        // Site menu points to the home page instead of the admin URL.
    103103        $this->assertEquals( home_url( '/' ), $node_site_name->href );
    104104
    105         // No profile links as the user doesn't have any permissions on the site
     105        // No profile links as the user doesn't have any permissions on the site.
    106106        $this->assertFalse( $node_my_account->href );
    107107        $this->assertFalse( $node_user_info->href );
     
    125125        $node_edit_profile = $wp_admin_bar->get_node( 'edit-profile' );
    126126
    127         // Site menu points to the admin URL
     127        // Site menu points to the admin URL.
    128128        $this->assertEquals( admin_url( '/' ), $node_site_name->href );
    129129
    130130        $profile_url = admin_url( 'profile.php' );
    131131
    132         // Profile URLs point to profile.php
     132        // Profile URLs point to profile.php.
    133133        $this->assertEquals( $profile_url, $node_my_account->href );
    134134        $this->assertEquals( $profile_url, $node_user_info->href );
     
    165165        $node_edit_profile = $wp_admin_bar->get_node( 'edit-profile' );
    166166
    167         // get primary blog
     167        // Get primary blog.
    168168        $primary = get_active_blog_for_user( self::$editor_id );
    169169        $this->assertInternalType( 'object', $primary );
    170170
    171         // No Site menu as the user isn't a member of this blog
     171        // No Site menu as the user isn't a member of this blog.
    172172        $this->assertNull( $node_site_name );
    173173
    174174        $primary_profile_url = get_admin_url( $primary->blog_id, 'profile.php' );
    175175
    176         // Ensure the user's primary blog is not the same as the main site
     176        // Ensure the user's primary blog is not the same as the main site.
    177177        $this->assertNotEquals( $primary_profile_url, admin_url( 'profile.php' ) );
    178178
    179         // Profile URLs should go to the user's primary blog
     179        // Profile URLs should go to the user's primary blog.
    180180        $this->assertEquals( $primary_profile_url, $node_my_account->href );
    181181        $this->assertEquals( $primary_profile_url, $node_user_info->href );
     
    204204        $this->assertTrue( is_user_member_of_blog( self::$no_role_id, get_current_blog_id() ) );
    205205
    206         // Remove `$nobody` from the current blog, so they're not a member of any blog
     206        // Remove `$nobody` from the current blog, so they're not a member of any blog.
    207207        $removed = remove_user_from_blog( self::$no_role_id, get_current_blog_id() );
    208208
     
    221221        $node_edit_profile = $wp_admin_bar->get_node( 'edit-profile' );
    222222
    223         // get primary blog
     223        // Get primary blog.
    224224        $primary = get_active_blog_for_user( self::$no_role_id );
    225225        $this->assertNull( $primary );
    226226
    227         // No Site menu as the user isn't a member of this site
     227        // No Site menu as the user isn't a member of this site.
    228228        $this->assertNull( $node_site_name );
    229229
     
    232232        $this->assertNotEquals( $user_profile_url, admin_url( 'profile.php' ) );
    233233
    234         // Profile URLs should go to the user's primary blog
     234        // Profile URLs should go to the user's primary blog.
    235235        $this->assertEquals( $user_profile_url, $node_my_account->href );
    236236        $this->assertEquals( $user_profile_url, $node_user_info->href );
     
    336336            ),
    337337            array(
    338                 // Boolean, false
     338                // Boolean, false.
    339339                array(
    340340                    'id'   => 'test-node',
Note: See TracChangeset for help on using the changeset viewer.