Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (4 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/dependencies/wpSanitizeScriptAttributes.php

    r50409 r52010  
    1010class Tests_Functions_wpSanitizeScriptAttributes extends WP_UnitTestCase {
    1111
    12     function test_sanitize_script_attributes_type_set() {
     12    public function test_sanitize_script_attributes_type_set() {
    1313        add_theme_support( 'html5', array( 'script' ) );
    1414
     
    4040    }
    4141
    42     function test_sanitize_script_attributes_type_not_set() {
     42    public function test_sanitize_script_attributes_type_not_set() {
    4343        add_theme_support( 'html5', array( 'script' ) );
    4444
     
    6969
    7070
    71     function test_sanitize_script_attributes_no_attributes() {
     71    public function test_sanitize_script_attributes_no_attributes() {
    7272        add_theme_support( 'html5', array( 'script' ) );
    7373
     
    8080    }
    8181
    82     function test_sanitize_script_attributes_relative_src() {
     82    public function test_sanitize_script_attributes_relative_src() {
    8383        add_theme_support( 'html5', array( 'script' ) );
    8484
     
    9898
    9999
    100     function test_sanitize_script_attributes_only_false_boolean_attributes() {
     100    public function test_sanitize_script_attributes_only_false_boolean_attributes() {
    101101        add_theme_support( 'html5', array( 'script' ) );
    102102
     
    114114    }
    115115
    116     function test_sanitize_script_attributes_only_true_boolean_attributes() {
     116    public function test_sanitize_script_attributes_only_true_boolean_attributes() {
    117117        add_theme_support( 'html5', array( 'script' ) );
    118118
Note: See TracChangeset for help on using the changeset viewer.