Make WordPress Core


Ignore:
Timestamp:
03/06/2022 11:02:12 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Tests: Restore the original user role in the (add|remove)_user_role hooks test.

This makes sure the test does not unintentionally affect other tests.

Follow-up to [52823].

Fixes #54164.

File:
1 edited

Legend:

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

    r52823 r52824  
    16421642
    16431643        $user->set_role( 'editor' );
    1644         $this->assertSame( 1, $remove_user_role->get_call_count() );
    1645         $this->assertSame( 1, $add_user_role->get_call_count() );
     1644        $user->set_role( 'administrator' );
     1645        $this->assertSame( 2, $remove_user_role->get_call_count() );
     1646        $this->assertSame( 2, $add_user_role->get_call_count() );
    16461647    }
    16471648
Note: See TracChangeset for help on using the changeset viewer.