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

    r51367 r52010  
    1515     * @ticket 22560
    1616     */
    17     function test_object_term_cache() {
     17    public function test_object_term_cache() {
    1818        $post_id = self::$post_ids[0];
    1919
     
    5151     * @ticket 24189
    5252     */
    53     function test_object_term_cache_when_term_changes() {
     53    public function test_object_term_cache_when_term_changes() {
    5454        $post_id = self::$post_ids[0];
    5555        $tag_id  = self::factory()->tag->create(
     
    169169     * @ticket 34723
    170170     */
    171     function test_get_the_terms_should_return_wp_error_when_taxonomy_is_unregistered() {
     171    public function test_get_the_terms_should_return_wp_error_when_taxonomy_is_unregistered() {
    172172        $p     = self::$post_ids[0];
    173173        $terms = get_the_terms( $p, 'this-taxonomy-does-not-exist' );
Note: See TracChangeset for help on using the changeset viewer.