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/formatting/cleanPre.php

    r51623 r52010  
    1010class Tests_Formatting_CleanPre extends WP_UnitTestCase {
    1111
    12     function test_removes_self_closing_br_with_space() {
     12    public function test_removes_self_closing_br_with_space() {
    1313        $source = 'a b c\n<br />sldfj<br />';
    1414        $res    = 'a b c\nsldfj';
     
    1717    }
    1818
    19     function test_removes_self_closing_br_without_space() {
     19    public function test_removes_self_closing_br_without_space() {
    2020        $source = 'a b c\n<br/>sldfj<br/>';
    2121        $res    = 'a b c\nsldfj';
     
    2727    // that replacement shouldn't happen (what if you want
    2828    // HTML 4 output?).
    29     function test_removes_html_br() {
     29    public function test_removes_html_br() {
    3030        $source = 'a b c\n<br>sldfj<br>';
    3131        $res    = 'a b c\nsldfj';
     
    3333    }
    3434
    35     function test_removes_p() {
     35    public function test_removes_p() {
    3636        $source = "<p>isn't this exciting!</p><p>oh indeed!</p>";
    3737        $res    = "\nisn't this exciting!\noh indeed!";
Note: See TracChangeset for help on using the changeset viewer.