WordPress.org

Make WordPress Core


Ignore:
Timestamp:
03/04/2021 10:11:38 AM (8 months ago)
Author:
SergeyBiryukov
Message:

Docs: Update inline comments in some test files per the documentation standards.

See #52628.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/user/capabilities.php

    r50490 r50491  
    646646        foreach ( self::$users as $role => $user ) {
    647647
    648             # Test adding the cap directly to the user
     648            // Test adding the cap directly to the user.
    649649            $user->add_cap( 'do_not_allow' );
    650650            $has_cap = $user->has_cap( 'do_not_allow' );
     
    652652            $this->assertFalse( $has_cap, "User with the {$role} role should not have the do_not_allow capability" );
    653653
    654             # Test adding the cap via a filter
     654            // Test adding the cap via a filter.
    655655            add_filter( 'user_has_cap', array( $this, 'grant_do_not_allow' ), 10, 4 );
    656656            $has_cap = $user->has_cap( 'do_not_allow' );
     
    663663            }
    664664
    665             # Test adding the cap to the user's role
     665            // Test adding the cap to the user's role.
    666666            $role_obj = get_role( $role );
    667667            $role_obj->add_cap( 'do_not_allow' );
     
    677677     */
    678678    public function test_do_not_allow_is_denied_for_super_admins() {
    679         # Test adding the cap directly to the user
     679        // Test adding the cap directly to the user.
    680680        self::$super_admin->add_cap( 'do_not_allow' );
    681681        $has_cap = self::$super_admin->has_cap( 'do_not_allow' );
     
    683683        $this->assertFalse( $has_cap, 'Super admins should not have the do_not_allow capability' );
    684684
    685         # Test adding the cap via a filter
     685        // Test adding the cap via a filter.
    686686        add_filter( 'user_has_cap', array( $this, 'grant_do_not_allow' ), 10, 4 );
    687687        $has_cap = self::$super_admin->has_cap( 'do_not_allow' );
Note: See TracChangeset for help on using the changeset viewer.