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/post/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_edit_post() {
     36    public function test_edit_post() {
    3737        $post_id = self::$post_id;
    3838
     
    7171     * Tests the model function that expects slashed data.
    7272     */
    73     function test_wp_insert_post() {
     73    public function test_wp_insert_post() {
    7474        $post_id = wp_insert_post(
    7575            array(
     
    107107     * Tests the model function that expects slashed data.
    108108     */
    109     function test_wp_update_post() {
     109    public function test_wp_update_post() {
    110110        $post_id = self::$post_id;
    111111
     
    142142     * @ticket 27550
    143143     */
    144     function test_wp_trash_untrash() {
     144    public function test_wp_trash_untrash() {
    145145        $post    = array(
    146146            'post_title'   => $this->slash_1,
Note: See TracChangeset for help on using the changeset viewer.