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/term/wpSetObjectTerms.php

    r51367 r52010  
    1515     * @ticket 26570
    1616     */
    17     function test_set_object_terms() {
     17    public function test_set_object_terms() {
    1818        $non_hier = rand_str( 10 );
    1919        $hier     = rand_str( 10 );
     
    100100    }
    101101
    102     function test_set_object_terms_by_id() {
     102    public function test_set_object_terms_by_id() {
    103103        $ids = self::$post_ids;
    104104
     
    130130    }
    131131
    132     function test_set_object_terms_by_name() {
     132    public function test_set_object_terms_by_name() {
    133133        $ids = self::$post_ids;
    134134
     
    163163    }
    164164
    165     function test_set_object_terms_invalid() {
     165    public function test_set_object_terms_invalid() {
    166166        // Bogus taxonomy.
    167167        $result = wp_set_object_terms( self::$post_ids[0], array( rand_str() ), rand_str() );
     
    247247     * Set some terms on an object; then change them while leaving one intact.
    248248     */
    249     function test_change_object_terms_by_id() {
     249    public function test_change_object_terms_by_id() {
    250250        $post_id = self::$post_ids[0];
    251251
     
    305305     * Set some terms on an object; then change them while leaving one intact.
    306306     */
    307     function test_change_object_terms_by_name() {
     307    public function test_change_object_terms_by_name() {
    308308        $post_id = self::$post_ids[0];
    309309
Note: See TracChangeset for help on using the changeset viewer.