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/import/parser.php

    r51568 r52010  
    77 */
    88class Tests_Import_Parser extends WP_Import_UnitTestCase {
    9     function set_up() {
     9    public function set_up() {
    1010        parent::set_up();
    1111
     
    2525    }
    2626
    27     function test_malformed_wxr() {
     27    public function test_malformed_wxr() {
    2828        $file = DIR_TESTDATA . '/export/malformed.xml';
    2929
     
    3737    }
    3838
    39     function test_invalid_wxr() {
     39    public function test_invalid_wxr() {
    4040        $f1 = DIR_TESTDATA . '/export/missing-version-tag.xml';
    4141        $f2 = DIR_TESTDATA . '/export/invalid-version-tag.xml';
     
    5151    }
    5252
    53     function test_wxr_version_1_1() {
     53    public function test_wxr_version_1_1() {
    5454        $file = DIR_TESTDATA . '/export/valid-wxr-1.1.xml';
    5555
     
    144144    }
    145145
    146     function test_wxr_version_1_0() {
     146    public function test_wxr_version_1_0() {
    147147        $file = DIR_TESTDATA . '/export/valid-wxr-1.0.xml';
    148148
     
    238238     * @link https://core.trac.wordpress.org/ticket/15203
    239239     */
    240     function test_escaped_cdata_closing_sequence() {
     240    public function test_escaped_cdata_closing_sequence() {
    241241        $file = DIR_TESTDATA . '/export/crazy-cdata-escaped.xml';
    242242
     
    271271     * with "]]>" unescaped within a CDATA section).
    272272     */
    273     function test_unescaped_cdata_closing_sequence() {
     273    public function test_unescaped_cdata_closing_sequence() {
    274274        $file = DIR_TESTDATA . '/export/crazy-cdata.xml';
    275275
Note: See TracChangeset for help on using the changeset viewer.