Make WordPress Core


Ignore:
Timestamp:
11/29/2022 12:32:37 PM (3 years ago)
Author:
SergeyBiryukov
Message:

Coding Standards: Add visibility to methods in tests/phpunit/tests/.

Adds a public visibility to test fixtures, tests, data providers, and callbacks methods. This continues the previous efforts to make sure visibility is declared on all methods.

Note: This will be enforced by WPCS 3.0.0.

Follow-up to [51919], [52009], [52010].

Props jrf.
See #56791.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/theme/wpThemeJsonResolver.php

    r54799 r54889  
    451451     * @ticket 54336
    452452     */
    453     function test_add_theme_supports_are_loaded_for_themes_without_theme_json() {
     453    public function test_add_theme_supports_are_loaded_for_themes_without_theme_json() {
    454454        switch_theme( 'default' );
    455455        $color_palette = array(
     
    499499     * @ticket 56611
    500500     */
    501     function test_merges_child_theme_json_into_parent_theme_json() {
     501    public function test_merges_child_theme_json_into_parent_theme_json() {
    502502        switch_theme( 'block-theme-child' );
    503503
     
    620620     * @covers WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles
    621621     */
    622     function test_get_user_data_from_wp_global_styles_does_not_use_uncached_queries() {
     622    public function test_get_user_data_from_wp_global_styles_does_not_use_uncached_queries() {
    623623        // Switch to a theme that does have support.
    624624        switch_theme( 'block-theme' );
     
    660660     * @covers WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles
    661661     */
    662     function test_get_user_data_from_wp_global_styles_does_not_use_uncached_queries_for_logged_out_users() {
     662    public function test_get_user_data_from_wp_global_styles_does_not_use_uncached_queries_for_logged_out_users() {
    663663        // Switch to a theme that does have support.
    664664        switch_theme( 'block-theme' );
     
    681681     * @covers WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles
    682682     */
    683     function test_get_user_data_from_wp_global_styles_does_not_run_for_theme_without_support() {
     683    public function test_get_user_data_from_wp_global_styles_does_not_run_for_theme_without_support() {
    684684        // The 'default' theme does not support theme.json.
    685685        switch_theme( 'default' );
     
    703703     * @covers WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles
    704704     */
    705     function test_get_user_data_from_wp_global_styles_does_exist() {
     705    public function test_get_user_data_from_wp_global_styles_does_exist() {
    706706        // Switch to a theme that does have support.
    707707        switch_theme( 'block-theme' );
     
    720720     * @covers WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles
    721721     */
    722     function test_get_user_data_from_wp_global_styles_create_post() {
     722    public function test_get_user_data_from_wp_global_styles_create_post() {
    723723        // Switch to a theme that does have support.
    724724        switch_theme( 'block-theme' );
     
    739739     * @covers WP_Theme_JSON_Resolver::get_user_data_from_wp_global_styles
    740740     */
    741     function test_get_user_data_from_wp_global_styles_filter_state() {
     741    public function test_get_user_data_from_wp_global_styles_filter_state() {
    742742        // Switch to a theme that does have support.
    743743        switch_theme( 'block-theme' );
     
    755755     * @covers WP_Theme_JSON_Resolver::get_theme_data
    756756     */
    757     function test_get_theme_data_theme_supports_overrides_theme_json() {
     757    public function test_get_theme_data_theme_supports_overrides_theme_json() {
    758758        // Test that get_theme_data() returns a WP_Theme_JSON object.
    759759        $theme_json_resolver = new WP_Theme_JSON_Resolver();
     
    778778     * @covers WP_Theme_JSON_Resolver::get_theme_data
    779779     */
    780     function test_get_theme_data_does_not_parse_theme_json_if_not_present() {
     780    public function test_get_theme_data_does_not_parse_theme_json_if_not_present() {
    781781        // The 'default' theme does not support theme.json.
    782782        switch_theme( 'default' );
Note: See TracChangeset for help on using the changeset viewer.