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

    r51568 r52010  
    88    public $revision_id;
    99
    10     function set_up() {
     10    public function set_up() {
    1111        parent::set_up();
    1212
     
    2828    }
    2929
    30     function test_invalid_username_password() {
     30    public function test_invalid_username_password() {
    3131        $result = $this->myxmlrpcserver->wp_restoreRevision( array( 1, 'username', 'password', $this->revision_id ) );
    3232        $this->assertIXRError( $result );
     
    3434    }
    3535
    36     function test_incapable_user() {
     36    public function test_incapable_user() {
    3737        $this->make_user_by_role( 'subscriber' );
    3838
     
    4242    }
    4343
    44     function test_capable_user() {
     44    public function test_capable_user() {
    4545        $this->make_user_by_role( 'editor' );
    4646
     
    4949    }
    5050
    51     function test_revision_restored() {
     51    public function test_revision_restored() {
    5252        $this->make_user_by_role( 'editor' );
    5353
Note: See TracChangeset for help on using the changeset viewer.