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

    r51367 r52010  
    55 */
    66class Tests_Post_Formats extends WP_UnitTestCase {
    7     function test_set_get_post_format_for_post() {
     7    public function test_set_get_post_format_for_post() {
    88        $post_id = self::factory()->post->create();
    99
     
    3333     * @ticket 22473
    3434     */
    35     function test_set_get_post_format_for_page() {
     35    public function test_set_get_post_format_for_page() {
    3636        $post_id = self::factory()->post->create( array( 'post_type' => 'page' ) );
    3737
     
    6565    }
    6666
    67     function test_has_format() {
     67    public function test_has_format() {
    6868        $post_id = self::factory()->post->create();
    6969
     
    9494     * @ticket 23570
    9595     */
    96     function test_get_url_in_content() {
     96    public function test_get_url_in_content() {
    9797        $link                 = 'http://nytimes.com';
    9898        $commentary           = 'This is my favorite link';
Note: See TracChangeset for help on using the changeset viewer.