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

    r51587 r52010  
    1010    public $post_custom_field;
    1111
    12     function set_up() {
     12    public function set_up() {
    1313        parent::set_up();
    1414
     
    2929    }
    3030
    31     function test_invalid_username_password() {
     31    public function test_invalid_username_password() {
    3232        $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'username', 'password', 1 ) );
    3333        $this->assertIXRError( $result );
     
    3535    }
    3636
    37     function test_valid_post() {
     37    public function test_valid_post() {
    3838        add_theme_support( 'post-thumbnails' );
    3939
     
    8080    }
    8181
    82     function test_no_fields() {
     82    public function test_no_fields() {
    8383        $fields = array();
    8484        $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'author', 'author', $this->post_id, $fields ) );
     
    9090    }
    9191
    92     function test_default_fields() {
     92    public function test_default_fields() {
    9393        $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'author', 'author', $this->post_id ) );
    9494        $this->assertNotIXRError( $result );
     
    100100    }
    101101
    102     function test_date() {
     102    public function test_date() {
    103103        $fields = array( 'post' );
    104104        $result = $this->myxmlrpcserver->wp_getPost( array( 1, 'author', 'author', $this->post_id, $fields ) );
     
    123123     * @ticket 21308
    124124     */
    125     function test_valid_page() {
     125    public function test_valid_page() {
    126126        $this->make_user_by_role( 'editor' );
    127127
Note: See TracChangeset for help on using the changeset viewer.