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

    r51367 r52010  
    66class Tests_XMLRPC_wp_getPosts extends WP_XMLRPC_UnitTestCase {
    77
    8     function test_invalid_username_password() {
     8    public function test_invalid_username_password() {
    99        $result = $this->myxmlrpcserver->wp_getPosts( array( 1, 'username', 'password' ) );
    1010        $this->assertIXRError( $result );
     
    1515     * @ticket 20991
    1616     */
    17     function test_incapable_user() {
     17    public function test_incapable_user() {
    1818        $this->make_user_by_role( 'subscriber' );
    1919
     
    2828    }
    2929
    30     function test_capable_user() {
     30    public function test_capable_user() {
    3131        $this->make_user_by_role( 'editor' );
    3232
     
    3535    }
    3636
    37     function test_invalid_post_type() {
     37    public function test_invalid_post_type() {
    3838        $this->make_user_by_role( 'editor' );
    3939
     
    4343    }
    4444
    45     function test_filters() {
     45    public function test_filters() {
    4646        $this->make_user_by_role( 'editor' );
    4747
     
    124124    }
    125125
    126     function test_fields() {
     126    public function test_fields() {
    127127        $this->make_user_by_role( 'editor' );
    128128        self::factory()->post->create();
     
    150150     * @ticket 21623
    151151     */
    152     function test_search() {
     152    public function test_search() {
    153153        $this->make_user_by_role( 'editor' );
    154154
Note: See TracChangeset for help on using the changeset viewer.