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/xmlrpc/wp/getTerm.php

    r51331 r52010  
    1616    }
    1717
    18     function test_invalid_username_password() {
     18    public function test_invalid_username_password() {
    1919        $result = $this->myxmlrpcserver->wp_getTerm( array( 1, 'username', 'password', 'category', 1 ) );
    2020        $this->assertIXRError( $result );
     
    2222    }
    2323
    24     function test_empty_taxonomy() {
     24    public function test_empty_taxonomy() {
    2525        $this->make_user_by_role( 'editor' );
    2626
     
    3131    }
    3232
    33     function test_invalid_taxonomy() {
     33    public function test_invalid_taxonomy() {
    3434        $this->make_user_by_role( 'editor' );
    3535
     
    4040    }
    4141
    42     function test_incapable_user() {
     42    public function test_incapable_user() {
    4343        $this->make_user_by_role( 'subscriber' );
    4444
     
    5050
    5151
    52     function test_empty_term() {
     52    public function test_empty_term() {
    5353        $this->make_user_by_role( 'editor' );
    5454
     
    5959    }
    6060
    61     function test_invalid_term() {
     61    public function test_invalid_term() {
    6262        $this->make_user_by_role( 'editor' );
    6363
     
    6868    }
    6969
    70     function test_valid_term() {
     70    public function test_valid_term() {
    7171        $this->make_user_by_role( 'editor' );
    7272
Note: See TracChangeset for help on using the changeset viewer.