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

    r51568 r52010  
    1616    }
    1717
    18     function set_up() {
     18    public function set_up() {
    1919        parent::set_up();
    2020
     
    3535     * Tests the extended model function that expects slashed data.
    3636     */
    37     function test_wp_new_comment() {
     37    public function test_wp_new_comment() {
    3838        $post_id = self::$post_id;
    3939
     
    7474     * Tests the controller function that expects slashed data.
    7575     */
    76     function test_edit_comment() {
     76    public function test_edit_comment() {
    7777        $post_id    = self::$post_id;
    7878        $comment_id = self::factory()->comment->create(
     
    120120     * Tests the model function that expects slashed data.
    121121     */
    122     function test_wp_insert_comment() {
     122    public function test_wp_insert_comment() {
    123123        $post_id = self::$post_id;
    124124
     
    151151     * Tests the model function that expects slashed data.
    152152     */
    153     function test_wp_update_comment() {
     153    public function test_wp_update_comment() {
    154154        $post_id    = self::$post_id;
    155155        $comment_id = self::factory()->comment->create(
Note: See TracChangeset for help on using the changeset viewer.