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/multisite/bootstrap.php

    r49603 r52010  
    124124         * @param string $message      The message to pass for failed tests.
    125125         */
    126         function test_get_network_by_path( $expected_key, $domain, $path, $message ) {
     126        public function test_get_network_by_path( $expected_key, $domain, $path, $message ) {
    127127            $network = get_network_by_path( $domain, $path );
    128128            $this->assertSame( self::$network_ids[ $expected_key ], $network->id, $message );
     
    256256         * @param string $path        The requested path.
    257257         */
    258         function test_multisite_bootstrap( $site_key, $network_key, $domain, $path ) {
     258        public function test_multisite_bootstrap( $site_key, $network_key, $domain, $path ) {
    259259            global $current_blog;
    260260
Note: See TracChangeset for help on using the changeset viewer.