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

    r51568 r52010  
    1919    }
    2020
    21     function set_up() {
     21    public function set_up() {
    2222        parent::set_up();
    2323
     
    3636     * Tests the controller function that expects slashed data.
    3737     */
    38     function test_edit_post() {
     38    public function test_edit_post() {
    3939        $post_id = self::$post_id;
    4040
     
    113113     * Tests the legacy model function that expects slashed data.
    114114     */
    115     function test_add_post_meta() {
     115    public function test_add_post_meta() {
    116116        $post_id = self::$post_id;
    117117
     
    128128     * Tests the legacy model function that expects slashed data.
    129129     */
    130     function test_update_post_meta() {
     130    public function test_update_post_meta() {
    131131        $post_id = self::$post_id;
    132132
     
    143143     * Tests the model function that expects slashed data.
    144144     */
    145     function test_add_comment_meta() {
     145    public function test_add_comment_meta() {
    146146        $comment_id = self::$comment_id;
    147147
     
    166166     * Tests the model function that expects slashed data.
    167167     */
    168     function test_update_comment_meta() {
     168    public function test_update_comment_meta() {
    169169        $comment_id = self::$comment_id;
    170170
     
    193193     * Tests the model function that expects slashed data.
    194194     */
    195     function test_add_user_meta() {
     195    public function test_add_user_meta() {
    196196        $user_id = self::$user_id;
    197197
     
    216216     * Tests the model function that expects slashed data.
    217217     */
    218     function test_update_user_meta() {
     218    public function test_update_user_meta() {
    219219        $user_id = self::$user_id;
    220220
Note: See TracChangeset for help on using the changeset viewer.