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/formatting/wpSlash.php

    r51623 r52010  
    5555     * @ticket 24106
    5656     */
    57     function test_adds_slashes() {
     57    public function test_adds_slashes() {
    5858        $old = "I can't see, isn't that it?";
    5959        $new = "I can\'t see, isn\'t that it?";
     
    6767     * @ticket 24106
    6868     */
    69     function test_preserves_original_datatype() {
     69    public function test_preserves_original_datatype() {
    7070
    7171        $this->assertTrue( wp_slash( true ) );
     
    9393     * @ticket 24106
    9494     */
    95     function test_add_even_more_slashes() {
     95    public function test_add_even_more_slashes() {
    9696        $old = 'single\\slash double\\\\slash triple\\\\\\slash';
    9797        $new = 'single\\\\slash double\\\\\\\\slash triple\\\\\\\\\\\\slash';
Note: See TracChangeset for help on using the changeset viewer.