Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (4 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/xmlrpc/wp/editTerm.php

    r51331 r52010  
    2727    }
    2828
    29     function test_invalid_username_password() {
     29    public function test_invalid_username_password() {
    3030        $result = $this->myxmlrpcserver->wp_editTerm( array( 1, 'username', 'password', 'category', 1 ) );
    3131        $this->assertIXRError( $result );
     
    3333    }
    3434
    35     function test_empty_taxonomy() {
     35    public function test_empty_taxonomy() {
    3636        $this->make_user_by_role( 'subscriber' );
    3737
     
    4242    }
    4343
    44     function test_invalid_taxonomy() {
     44    public function test_invalid_taxonomy() {
    4545        $this->make_user_by_role( 'subscriber' );
    4646
     
    5151    }
    5252
    53     function test_incapable_user() {
     53    public function test_incapable_user() {
    5454        $this->make_user_by_role( 'subscriber' );
    5555
     
    6060    }
    6161
    62     function test_term_not_exists() {
     62    public function test_term_not_exists() {
    6363        $this->make_user_by_role( 'editor' );
    6464
     
    6969    }
    7070
    71     function test_empty_term() {
     71    public function test_empty_term() {
    7272        $this->make_user_by_role( 'editor' );
    7373
     
    7878    }
    7979
    80     function test_empty_term_name() {
     80    public function test_empty_term_name() {
    8181        $this->make_user_by_role( 'editor' );
    8282
     
    9898    }
    9999
    100     function test_parent_for_nonhierarchical() {
     100    public function test_parent_for_nonhierarchical() {
    101101        $this->make_user_by_role( 'editor' );
    102102
     
    118118    }
    119119
    120     function test_parent_empty() {
     120    public function test_parent_empty() {
    121121        $this->make_user_by_role( 'editor' );
    122122
     
    138138    }
    139139
    140     function test_parent_null() {
     140    public function test_parent_null() {
    141141        $this->make_user_by_role( 'editor' );
    142142
     
    162162    }
    163163
    164     function test_parent_invalid() {
     164    public function test_parent_invalid() {
    165165        $this->make_user_by_role( 'editor' );
    166166
     
    182182    }
    183183
    184     function test_parent_not_existing() {
     184    public function test_parent_not_existing() {
    185185        $this->make_user_by_role( 'editor' );
    186186
     
    203203    }
    204204
    205     function test_parent_duplicate_slug() {
     205    public function test_parent_duplicate_slug() {
    206206        $this->make_user_by_role( 'editor' );
    207207
     
    224224    }
    225225
    226     function test_edit_all_fields() {
     226    public function test_edit_all_fields() {
    227227        $this->make_user_by_role( 'editor' );
    228228
Note: See TracChangeset for help on using the changeset viewer.