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/image/header.php

    r51568 r52010  
    99    public $custom_image_header;
    1010
    11     function set_up() {
     11    public function set_up() {
    1212        parent::set_up();
    1313        $this->custom_image_header = new Custom_Image_Header( '__return_null' );
    1414    }
    1515
    16     function test_header_image_has_correct_dimensions_with_max_width() {
     16    public function test_header_image_has_correct_dimensions_with_max_width() {
    1717        global $_wp_theme_features;
    1818
     
    3434    }
    3535
    36     function test_header_image_has_correct_dimensions_with_fixed() {
     36    public function test_header_image_has_correct_dimensions_with_fixed() {
    3737        global $_wp_theme_features;
    3838
     
    5454    }
    5555
    56     function test_header_image_has_correct_dimensions_with_flex_height() {
     56    public function test_header_image_has_correct_dimensions_with_flex_height() {
    5757        global $_wp_theme_features;
    5858
     
    7474    }
    7575
    76     function test_header_image_has_correct_dimensions_with_flex_width() {
     76    public function test_header_image_has_correct_dimensions_with_flex_width() {
    7777        global $_wp_theme_features;
    7878
     
    9494    }
    9595
    96     function test_header_image_has_correct_dimensions_with_flex_width_and_height() {
     96    public function test_header_image_has_correct_dimensions_with_flex_width_and_height() {
    9797        global $_wp_theme_features;
    9898
     
    114114    }
    115115
    116     function test_create_attachment_object() {
     116    public function test_create_attachment_object() {
    117117        $id = wp_insert_attachment(
    118118            array(
     
    133133    }
    134134
    135     function test_insert_cropped_attachment() {
     135    public function test_insert_cropped_attachment() {
    136136        $id = wp_insert_attachment(
    137137            array(
     
    155155     * @ticket 21819
    156156     */
    157     function test_check_get_previous_crop() {
     157    public function test_check_get_previous_crop() {
    158158        $id = wp_insert_attachment(
    159159            array(
Note: See TracChangeset for help on using the changeset viewer.