Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (3 years ago)
Author:
hellofromTonya
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods.

Adds a private visibility to helper methods within test classes.

Renames callbacks and helpers that previously started with a _ prefix. Why? For consistency and to leverage using the method visibility. Further naming standardizations is beyond the scope of this commit.

Props costdev, jrf, hellofromTonya.
Fixes #54177.

File:
1 edited

Legend:

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

    r51454 r52010  
    1111     * @ticket 19500
    1212     */
    13     function test_get_blogs_of_user() {
     13    public function test_get_blogs_of_user() {
    1414        // Logged out users don't have blogs.
    1515        $this->assertSame( array(), get_blogs_of_user( 0 ) );
     
    3232     * @ticket 19500
    3333     */
    34     function test_is_user_member_of_blog() {
     34    public function test_is_user_member_of_blog() {
    3535        $old_current = get_current_user_id();
    3636
     
    5454    }
    5555
    56     function test_delete_user() {
     56    public function test_delete_user() {
    5757        $user_id = self::factory()->user->create( array( 'role' => 'author' ) );
    5858        $user    = new WP_User( $user_id );
     
    112112     * @ticket 20447
    113113     */
    114     function test_wp_delete_user_reassignment_clears_post_caches() {
     114    public function test_wp_delete_user_reassignment_clears_post_caches() {
    115115        $user_id  = self::factory()->user->create();
    116116        $reassign = self::factory()->user->create();
Note: See TracChangeset for help on using the changeset viewer.