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/dependencies/jquery.php

    r51419 r52010  
    1010     * @covers WP_Scripts::query
    1111     */
    12     function test_location_of_jquery() {
     12    public function test_location_of_jquery() {
    1313        $scripts = new WP_Scripts;
    1414        wp_default_scripts( $scripts );
     
    4747     * @covers ::wp_script_is
    4848     */
    49     function test_dont_allow_deregister_core_scripts_in_admin() {
     49    public function test_dont_allow_deregister_core_scripts_in_admin() {
    5050        set_current_screen( 'edit.php' );
    5151        $this->assertTrue( is_admin() );
     
    9090     * @covers ::wp_script_is
    9191     */
    92     function test_wp_script_is_dep_enqueued() {
     92    public function test_wp_script_is_dep_enqueued() {
    9393        wp_enqueue_script( 'jquery-ui-accordion' );
    9494
     
    106106     * @covers WP_Scripts::do_items
    107107     */
    108     function test_jquery_in_footer() {
     108    public function test_jquery_in_footer() {
    109109        $scripts = new WP_Scripts;
    110110        $scripts->add( 'jquery', false, array( 'jquery-core', 'jquery-migrate' ) );
Note: See TracChangeset for help on using the changeset viewer.