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

    r51397 r52010  
    55 */
    66class Tests_Dependencies extends WP_UnitTestCase {
    7     function test_add() {
     7    public function test_add() {
    88        $dep = new WP_Dependencies;
    99
     
    1818    }
    1919
    20     function test_remove() {
     20    public function test_remove() {
    2121        $dep = new WP_Dependencies;
    2222
     
    3131    }
    3232
    33     function test_enqueue() {
     33    public function test_enqueue() {
    3434        $dep = new WP_Dependencies;
    3535
     
    4747    }
    4848
    49     function test_dequeue() {
     49    public function test_dequeue() {
    5050        $dep = new WP_Dependencies;
    5151
     
    6767    }
    6868
    69     function test_enqueue_args() {
     69    public function test_enqueue_args() {
    7070        $dep = new WP_Dependencies;
    7171
     
    8585    }
    8686
    87     function test_dequeue_args() {
     87    public function test_dequeue_args() {
    8888        $dep = new WP_Dependencies;
    8989
     
    112112     * @ticket 21741
    113113     */
    114     function test_query_and_registered_enqueued() {
     114    public function test_query_and_registered_enqueued() {
    115115        $dep = new WP_Dependencies;
    116116
Note: See TracChangeset for help on using the changeset viewer.