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/option/networkOption.php

    r51397 r52010  
    1616     * @group ms-required
    1717     */
    18     function test_add_network_option_not_available_on_other_network() {
     18    public function test_add_network_option_not_available_on_other_network() {
    1919        $id     = self::factory()->network->create();
    2020        $option = __FUNCTION__;
     
    2828     * @group ms-required
    2929     */
    30     function test_add_network_option_available_on_same_network() {
     30    public function test_add_network_option_available_on_same_network() {
    3131        $id     = self::factory()->network->create();
    3232        $option = __FUNCTION__;
     
    4040     * @group ms-required
    4141     */
    42     function test_delete_network_option_on_only_one_network() {
     42    public function test_delete_network_option_on_only_one_network() {
    4343        $id     = self::factory()->network->create();
    4444        $option = __FUNCTION__;
     
    8585     * @param $expected_response
    8686     */
    87     function test_add_network_option_network_id_parameter( $network_id, $expected_response ) {
     87    public function test_add_network_option_network_id_parameter( $network_id, $expected_response ) {
    8888        $option = rand_str();
    8989        $value  = rand_str();
     
    9898     * @param $expected_response
    9999     */
    100     function test_get_network_option_network_id_parameter( $network_id, $expected_response ) {
     100    public function test_get_network_option_network_id_parameter( $network_id, $expected_response ) {
    101101        $option = rand_str();
    102102
     
    104104    }
    105105
    106     function data_network_id_parameter() {
     106    public function data_network_id_parameter() {
    107107        return array(
    108108            // Numeric values should always be accepted.
Note: See TracChangeset for help on using the changeset viewer.