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/theme/getThemeStarterContent.php

    r51438 r52010  
    1111     * Testing passing an empty array as starter content.
    1212     */
    13     function test_add_theme_support_empty() {
     13    public function test_add_theme_support_empty() {
    1414        add_theme_support( 'starter-content', array() );
    1515        $starter_content = get_theme_starter_content();
     
    2121     * Testing passing nothing as starter content.
    2222     */
    23     function test_add_theme_support_single_param() {
     23    public function test_add_theme_support_single_param() {
    2424        add_theme_support( 'starter-content' );
    2525        $starter_content = get_theme_starter_content();
     
    3131     * Testing that placeholder starter content gets expanded, that unrecognized placeholders are discarded, and that custom items are recognized.
    3232     */
    33     function test_default_content_sections() {
     33    public function test_default_content_sections() {
    3434        /*
    3535         * All placeholder identifiers should be referenced in this sample starter
     
    173173     * Testing the filter with the text_credits widget.
    174174     */
    175     function test_get_theme_starter_content_filter() {
     175    public function test_get_theme_starter_content_filter() {
    176176
    177177        add_theme_support(
Note: See TracChangeset for help on using the changeset viewer.