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

    r49327 r52010  
    99     * @ticket 22883
    1010     */
    11     function test_get_page_uri_with_stdclass_post_object() {
     11    public function test_get_page_uri_with_stdclass_post_object() {
    1212        $post_id = self::factory()->post->create( array( 'post_name' => 'get-page-uri-post-name' ) );
    1313
     
    2323     * @ticket 24491
    2424     */
    25     function test_get_page_uri_with_nonexistent_post() {
     25    public function test_get_page_uri_with_nonexistent_post() {
    2626        global $wpdb;
    2727        $post_id = $wpdb->get_var( "SELECT MAX(ID) FROM $wpdb->posts" ) + 1;
     
    3232     * @ticket 15963
    3333     */
    34     function test_get_post_uri_check_orphan() {
     34    public function test_get_post_uri_check_orphan() {
    3535        $parent_id = self::factory()->post->create( array( 'post_name' => 'parent' ) );
    3636        $child_id  = self::factory()->post->create(
     
    5555     * @ticket 36174
    5656     */
    57     function test_get_page_uri_with_a_draft_parent_with_empty_slug() {
     57    public function test_get_page_uri_with_a_draft_parent_with_empty_slug() {
    5858        $parent_id = self::factory()->post->create( array( 'post_name' => 'parent' ) );
    5959        $child_id  = self::factory()->post->create(
     
    7878     * @ticket 26284
    7979     */
    80     function test_get_page_uri_without_argument() {
     80    public function test_get_page_uri_without_argument() {
    8181        $post_id = self::factory()->post->create(
    8282            array(
Note: See TracChangeset for help on using the changeset viewer.