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/admin/includesPost.php

    r51968 r52010  
    2727    }
    2828
    29     function test__wp_translate_postdata_cap_checks_contributor() {
     29    public function test__wp_translate_postdata_cap_checks_contributor() {
    3030        wp_set_current_user( self::$contributor_id );
    3131
     
    7777    }
    7878
    79     function test__wp_translate_postdata_cap_checks_editor() {
     79    public function test__wp_translate_postdata_cap_checks_editor() {
    8080        wp_set_current_user( self::$editor_id );
    8181
     
    132132     * @ticket 25272
    133133     */
    134     function test_edit_post_auto_draft() {
     134    public function test_edit_post_auto_draft() {
    135135        wp_set_current_user( self::$editor_id );
    136136        $post = self::factory()->post->create_and_get( array( 'post_status' => 'auto-draft' ) );
     
    790790    }
    791791
    792     function test_use_block_editor_for_post() {
     792    public function test_use_block_editor_for_post() {
    793793        $this->assertFalse( use_block_editor_for_post( -1 ) );
    794794        $bogus_post_id = $this->factory()->post->create(
     
    823823    }
    824824
    825     function test_get_block_editor_server_block_settings() {
     825    public function test_get_block_editor_server_block_settings() {
    826826        $name     = 'core/test';
    827827        $settings = array(
Note: See TracChangeset for help on using the changeset viewer.