Make WordPress Core


Ignore:
Timestamp:
11/04/2021 03:22:47 PM (5 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/block-template.php

    r51568 r52010  
    4444         * Regression: https://github.com/WordPress/gutenberg/issues/31399.
    4545         */
    46         function test_custom_page_php_template_takes_precedence_over_all_other_templates() {
     46        public function test_custom_page_php_template_takes_precedence_over_all_other_templates() {
    4747                $custom_page_template      = 'templates/full-width.php';
    4848                $custom_page_template_path = get_stylesheet_directory() . '/' . $custom_page_template;
     
    6161         * Covers: https://github.com/WordPress/gutenberg/pull/30438.
    6262         */
    63         function test_custom_page_block_template_takes_precedence_over_all_other_templates() {
     63        public function test_custom_page_block_template_takes_precedence_over_all_other_templates() {
    6464                global $_wp_current_template_content;
    6565
     
    8181         * Regression: https://github.com/WordPress/gutenberg/issues/31652.
    8282         */
    83         function test_template_remains_unchanged_if_templates_array_is_empty() {
     83        public function test_template_remains_unchanged_if_templates_array_is_empty() {
    8484                $resolved_template_path = locate_block_template( '', 'search', array() );
    8585                $this->assertSame( '', $resolved_template_path );
Note: See TracChangeset for help on using the changeset viewer.