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/getComment.php

    r51331 r52010  
    3434    }
    3535
    36     function test_invalid_username_password() {
     36    public function test_invalid_username_password() {
    3737        $result = $this->myxmlrpcserver->wp_getComment( array( 1, 'username', 'password', self::$parent_comment_id ) );
    3838        $this->assertIXRError( $result );
     
    4040    }
    4141
    42     function test_incapable_user() {
     42    public function test_incapable_user() {
    4343        $this->make_user_by_role( 'contributor' );
    4444
     
    4848    }
    4949
    50     function test_valid_comment() {
     50    public function test_valid_comment() {
    5151        $this->make_user_by_role( 'editor' );
    5252
     
    8484    }
    8585
    86     function test_valid_child_comment() {
     86    public function test_valid_child_comment() {
    8787        $this->make_user_by_role( 'editor' );
    8888
     
    9494    }
    9595
    96     function test_invalid_id() {
     96    public function test_invalid_id() {
    9797        $this->make_user_by_role( 'editor' );
    9898
Note: See TracChangeset for help on using the changeset viewer.