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

    r51568 r52010  
    1414    }
    1515
    16     function test_the_basics() {
     16    public function test_the_basics() {
    1717        $key    = 'key1';
    1818        $value  = 'value1';
     
    3030    }
    3131
    32     function test_serialized_data() {
     32    public function test_serialized_data() {
    3333        $key   = rand_str();
    3434        $value = array(
     
    4949     * @ticket 22807
    5050     */
    51     function test_transient_data_with_timeout() {
     51    public function test_transient_data_with_timeout() {
    5252        $key   = rand_str();
    5353        $value = rand_str();
     
    7070     * @ticket 22807
    7171     */
    72     function test_transient_add_timeout() {
     72    public function test_transient_add_timeout() {
    7373        $key    = rand_str();
    7474        $value  = rand_str();
     
    9393     * @ticket 30380
    9494     */
    95     function test_nonexistent_key_dont_delete_if_false() {
     95    public function test_nonexistent_key_dont_delete_if_false() {
    9696        // Create a bogus a transient.
    9797        $key = 'test_transient';
     
    121121     * @ticket 30380
    122122     */
    123     function test_nonexistent_key_old_timeout() {
     123    public function test_nonexistent_key_old_timeout() {
    124124        // Create a transient.
    125125        $key = 'test_transient';
Note: See TracChangeset for help on using the changeset viewer.