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/user/session.php

    r51568 r52010  
    88class Tests_User_Session extends WP_UnitTestCase {
    99
    10     function set_up() {
     10    public function set_up() {
    1111        parent::set_up();
    1212        remove_all_filters( 'session_token_manager' );
     
    1717    }
    1818
    19     function test_verify_and_destroy_token() {
     19    public function test_verify_and_destroy_token() {
    2020        $expiration = time() + DAY_IN_SECONDS;
    2121        $token      = $this->manager->create( $expiration );
     
    2626    }
    2727
    28     function test_destroy_other_tokens() {
     28    public function test_destroy_other_tokens() {
    2929        $expiration = time() + DAY_IN_SECONDS;
    3030        $token_1    = $this->manager->create( $expiration );
     
    4040    }
    4141
    42     function test_destroy_all_tokens() {
     42    public function test_destroy_all_tokens() {
    4343        $expiration = time() + DAY_IN_SECONDS;
    4444        $token_1    = $this->manager->create( $expiration );
Note: See TracChangeset for help on using the changeset viewer.