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/post/wpListPages.php

    r49603 r52010  
    116116    }
    117117
    118     function test_wp_list_pages_default() {
     118    public function test_wp_list_pages_default() {
    119119        $args = array(
    120120            'echo' => false,
     
    147147    }
    148148
    149     function test_wp_list_pages_depth() {
     149    public function test_wp_list_pages_depth() {
    150150        $args = array(
    151151            'echo'  => false,
     
    161161    }
    162162
    163     function test_wp_list_pages_show_date() {
     163    public function test_wp_list_pages_show_date() {
    164164        $args = array(
    165165            'echo'      => false,
     
    177177    }
    178178
    179     function test_wp_list_pages_date_format() {
     179    public function test_wp_list_pages_date_format() {
    180180        $args = array(
    181181            'echo'        => false,
     
    211211    }
    212212
    213     function test_wp_list_pages_child_of() {
     213    public function test_wp_list_pages_child_of() {
    214214        $args = array(
    215215            'echo'     => false,
     
    225225    }
    226226
    227     function test_wp_list_pages_exclude() {
     227    public function test_wp_list_pages_exclude() {
    228228        $args = array(
    229229            'echo'    => false,
     
    253253    }
    254254
    255     function test_wp_list_pages_title_li() {
     255    public function test_wp_list_pages_title_li() {
    256256        $args = array(
    257257            'echo'     => false,
     
    268268    }
    269269
    270     function test_wp_list_pages_echo() {
     270    public function test_wp_list_pages_echo() {
    271271        $args = array(
    272272            'echo'  => true,
     
    283283    }
    284284
    285     function test_wp_list_pages_authors() {
     285    public function test_wp_list_pages_authors() {
    286286        $args = array(
    287287            'echo'    => false,
     
    295295    }
    296296
    297     function test_wp_list_pages_number() {
     297    public function test_wp_list_pages_number() {
    298298        $args = array(
    299299            'echo'        => false,
     
    308308    }
    309309
    310     function test_wp_list_pages_sort_column() {
     310    public function test_wp_list_pages_sort_column() {
    311311        $args = array(
    312312            'echo'        => false,
     
    324324    }
    325325
    326     function test_wp_list_pages_link_before() {
     326    public function test_wp_list_pages_link_before() {
    327327        $args = array(
    328328            'echo'        => false,
     
    356356    }
    357357
    358     function test_wp_list_pages_link_after() {
     358    public function test_wp_list_pages_link_after() {
    359359        $args = array(
    360360            'echo'       => false,
     
    389389
    390390
    391     function test_wp_list_pages_include() {
     391    public function test_wp_list_pages_include() {
    392392        $args = array(
    393393            'echo'    => false,
     
    402402    }
    403403
    404     function test_wp_list_pages_exclude_tree() {
     404    public function test_wp_list_pages_exclude_tree() {
    405405        $args = array(
    406406            'echo'         => false,
     
    420420    }
    421421
    422     function test_wp_list_pages_discarded_whitespace() {
     422    public function test_wp_list_pages_discarded_whitespace() {
    423423        $args = array(
    424424            'echo'         => false,
Note: See TracChangeset for help on using the changeset viewer.