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

    r51331 r52010  
    1515    }
    1616
    17     function test_invalid_username_password() {
     17    public function test_invalid_username_password() {
    1818        $result = $this->myxmlrpcserver->wp_deleteTerm( array( 1, 'username', 'password', 'category', 0 ) );
    1919        $this->assertIXRError( $result );
     
    2121    }
    2222
    23     function test_empty_taxonomy() {
     23    public function test_empty_taxonomy() {
    2424        $this->make_user_by_role( 'subscriber' );
    2525
     
    3030    }
    3131
    32     function test_invalid_taxonomy() {
     32    public function test_invalid_taxonomy() {
    3333        $this->make_user_by_role( 'subscriber' );
    3434
     
    3939    }
    4040
    41     function test_incapable_user() {
     41    public function test_incapable_user() {
    4242        $this->make_user_by_role( 'subscriber' );
    4343
     
    4848    }
    4949
    50     function test_empty_term() {
     50    public function test_empty_term() {
    5151        $this->make_user_by_role( 'editor' );
    5252
     
    5757    }
    5858
    59     function test_invalid_term() {
     59    public function test_invalid_term() {
    6060        $this->make_user_by_role( 'editor' );
    6161
     
    6666    }
    6767
    68     function test_term_deleted() {
     68    public function test_term_deleted() {
    6969        $this->make_user_by_role( 'editor' );
    7070
Note: See TracChangeset for help on using the changeset viewer.