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

    r50954 r52010  
    99 */
    1010class Tests_XMLRPC_Basic extends WP_XMLRPC_UnitTestCase {
    11     function test_enabled() {
     11    public function test_enabled() {
    1212        $result = $this->myxmlrpcserver->wp_getOptions( array( 1, 'username', 'password' ) );
    1313
     
    1717    }
    1818
    19     function test_login_pass_ok() {
     19    public function test_login_pass_ok() {
    2020        $this->make_user_by_role( 'subscriber' );
    2121
     
    2424    }
    2525
    26     function test_login_pass_bad() {
     26    public function test_login_pass_bad() {
    2727        $this->make_user_by_role( 'subscriber' );
    2828
     
    3737     * @ticket 34336
    3838     */
    39     function test_multicall_invalidates_all_calls_after_invalid_call() {
     39    public function test_multicall_invalidates_all_calls_after_invalid_call() {
    4040        $editor_id = $this->make_user_by_role( 'editor' );
    4141        $post_id   = self::factory()->post->create(
     
    100100     * @ticket 36586
    101101     */
    102     function test_isStruct_on_non_numerically_indexed_array() {
     102    public function test_isStruct_on_non_numerically_indexed_array() {
    103103        $value = new IXR_Value( array( '0.0' => 100 ) );
    104104
     
    110110    }
    111111
    112     function test_disabled() {
     112    public function test_disabled() {
    113113        add_filter( 'xmlrpc_enabled', '__return_false' );
    114114        $testcase_xmlrpc_server = new wp_xmlrpc_server();
Note: See TracChangeset for help on using the changeset viewer.