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

    r51568 r52010  
    1515    }
    1616
    17     function set_up() {
     17    public function set_up() {
    1818        parent::set_up();
    1919
     
    3434     * Tests the controller function that expects slashed data.
    3535     */
    36     function test_add_user() {
     36    public function test_add_user() {
    3737        $_POST                 = array();
    3838        $_GET                  = array();
     
    8989     * Tests the controller function that expects slashed data.
    9090     */
    91     function test_edit_user() {
     91    public function test_edit_user() {
    9292        $user_id = self::$user_id;
    9393
     
    140140     * Tests the model function that expects slashed data.
    141141     */
    142     function test_wp_insert_user() {
     142    public function test_wp_insert_user() {
    143143        $user_id = wp_insert_user(
    144144            array(
     
    187187     * Tests the model function that expects slashed data.
    188188     */
    189     function test_wp_update_user() {
     189    public function test_wp_update_user() {
    190190        $user_id = self::$user_id;
    191191        $user_id = wp_update_user(
Note: See TracChangeset for help on using the changeset viewer.