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

    r51568 r52010  
    88    public $cpt_args;
    99
    10     function set_up() {
     10    public function set_up() {
    1111        parent::set_up();
    1212
     
    2424    }
    2525
    26     function test_invalid_username_password() {
     26    public function test_invalid_username_password() {
    2727        $result = $this->myxmlrpcserver->wp_getPostType( array( 1, 'username', 'password', 'post' ) );
    2828        $this->assertIXRError( $result );
     
    3030    }
    3131
    32     function test_invalid_post_type_name() {
     32    public function test_invalid_post_type_name() {
    3333        $this->make_user_by_role( 'editor' );
    3434
     
    3838    }
    3939
    40     function test_valid_post_type_name() {
     40    public function test_valid_post_type_name() {
    4141        $this->make_user_by_role( 'editor' );
    4242
     
    4545    }
    4646
    47     function test_incapable_user() {
     47    public function test_incapable_user() {
    4848        $this->make_user_by_role( 'subscriber' );
    4949
     
    5353    }
    5454
    55     function test_valid_type() {
     55    public function test_valid_type() {
    5656        $this->make_user_by_role( 'editor' );
    5757
Note: See TracChangeset for help on using the changeset viewer.