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

    r51943 r52010  
    77class Tests_XMLRPC_wp_getUsers extends WP_XMLRPC_UnitTestCase {
    88
    9     function test_invalid_username_password() {
     9    public function test_invalid_username_password() {
    1010        $results = $this->myxmlrpcserver->wp_getUsers( array( 1, 'username', 'password' ) );
    1111        $this->assertIXRError( $results );
     
    1313    }
    1414
    15     function test_incapable_user() {
     15    public function test_incapable_user() {
    1616        $this->make_user_by_role( 'subscriber' );
    1717
     
    2121    }
    2222
    23     function test_capable_user() {
     23    public function test_capable_user() {
    2424        $this->make_user_by_role( 'administrator' );
    2525
     
    4343    }
    4444
    45     function test_invalid_role() {
     45    public function test_invalid_role() {
    4646        $administrator_id = $this->make_user_by_role( 'administrator' );
    4747        if ( is_multisite() ) {
     
    5858     * @expectedDeprecated WP_User_Query
    5959     */
    60     function test_role_filter() {
     60    public function test_role_filter() {
    6161        $author_id        = $this->make_user_by_role( 'author' );
    6262        $editor_id        = $this->make_user_by_role( 'editor' );
     
    8080    }
    8181
    82     function test_paging_filters() {
     82    public function test_paging_filters() {
    8383        $administrator_id = $this->make_user_by_role( 'administrator' );
    8484        if ( is_multisite() ) {
     
    109109    }
    110110
    111     function test_order_filters() {
     111    public function test_order_filters() {
    112112        $this->make_user_by_role( 'administrator' );
    113113
Note: See TracChangeset for help on using the changeset viewer.