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/postmeta.php

    r51568 r52010  
    77 */
    88class Tests_Import_Postmeta extends WP_Import_UnitTestCase {
    9     function set_up() {
     9    public function set_up() {
    1010        parent::set_up();
    1111
     
    2525    }
    2626
    27     function test_serialized_postmeta_no_cdata() {
     27    public function test_serialized_postmeta_no_cdata() {
    2828        $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-no-cdata.xml', array( 'johncoswell' => 'john' ) );
    2929        $expected['special_post_title'] = 'A special title';
     
    3232    }
    3333
    34     function test_utw_postmeta() {
     34    public function test_utw_postmeta() {
    3535        $this->_import_wp( DIR_TESTDATA . '/export/test-utw-post-meta-import.xml', array( 'johncoswell' => 'john' ) );
    3636
     
    8181     * @ticket 9633
    8282     */
    83     function test_serialized_postmeta_with_cdata() {
     83    public function test_serialized_postmeta_with_cdata() {
    8484        $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-with-cdata.xml', array( 'johncoswell' => 'johncoswell' ) );
    8585
     
    9595     * @ticket 11574
    9696     */
    97     function test_serialized_postmeta_with_evil_stuff_in_cdata() {
     97    public function test_serialized_postmeta_with_evil_stuff_in_cdata() {
    9898        $this->_import_wp( DIR_TESTDATA . '/export/test-serialized-postmeta-with-cdata.xml', array( 'johncoswell' => 'johncoswell' ) );
    9999        // Evil content in the CDATA.
Note: See TracChangeset for help on using the changeset viewer.