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/mw/getPost.php

    r51587 r52010  
    2222    }
    2323
    24     function test_invalid_username_password() {
     24    public function test_invalid_username_password() {
    2525        $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'username', 'password' ) );
    2626        $this->assertIXRError( $result );
     
    2828    }
    2929
    30     function test_incapable_user() {
     30    public function test_incapable_user() {
    3131        $this->make_user_by_role( 'subscriber' );
    3232
     
    3939     * @ticket 20336
    4040     */
    41     function test_invalid_postid() {
     41    public function test_invalid_postid() {
    4242        $result = $this->myxmlrpcserver->mw_getPost( array( 9999, 'author', 'author' ) );
    4343        $this->assertIXRError( $result );
     
    4545    }
    4646
    47     function test_valid_post() {
     47    public function test_valid_post() {
    4848        add_theme_support( 'post-thumbnails' );
    4949
     
    9393     * @requires function imagejpeg
    9494     */
    95     function test_post_thumbnail() {
     95    public function test_post_thumbnail() {
    9696        add_theme_support( 'post-thumbnails' );
    9797
     
    112112    }
    113113
    114     function test_date() {
     114    public function test_date() {
    115115        $fields = array( 'post' );
    116116        $result = $this->myxmlrpcserver->mw_getPost( array( self::$post_id, 'author', 'author' ) );
Note: See TracChangeset for help on using the changeset viewer.