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/widgets/wpWidgetMediaImage.php

    r51493 r52010  
    2020     * @global WP_Styles $wp_styles
    2121     */
    22     function clean_up_global_scope() {
     22    public function clean_up_global_scope() {
    2323        global $wp_scripts, $wp_styles;
    2424        parent::clean_up_global_scope();
     
    3232     * @covers WP_Widget_Media_Image::get_instance_schema
    3333     */
    34     function test_get_instance_schema() {
     34    public function test_get_instance_schema() {
    3535        $widget = new WP_Widget_Media_Image();
    3636        $schema = $widget->get_instance_schema();
     
    6565     * @ticket 45029
    6666     */
    67     function test_get_instance_schema_filtering() {
     67    public function test_get_instance_schema_filtering() {
    6868        $widget = new WP_Widget_Media_Image();
    6969        $schema = $widget->get_instance_schema();
     
    9595     * @covers WP_Widget_Media_Image::__construct
    9696     */
    97     function test_constructor() {
     97    public function test_constructor() {
    9898        $widget = new WP_Widget_Media_Image();
    9999
     
    124124     * @covers WP_Widget_Media_Image::update
    125125     */
    126     function test_update() {
     126    public function test_update() {
    127127        $widget   = new WP_Widget_Media_Image();
    128128        $instance = array();
     
    411411     * @requires function imagejpeg
    412412     */
    413     function test_render_media() {
     413    public function test_render_media() {
    414414        $widget = new WP_Widget_Media_Image();
    415415
     
    609609     * @covers WP_Widget_Media_Image::enqueue_admin_scripts
    610610     */
    611     function test_enqueue_admin_scripts() {
     611    public function test_enqueue_admin_scripts() {
    612612        set_current_screen( 'widgets.php' );
    613613        $widget = new WP_Widget_Media_Image();
     
    622622     * @covers WP_Widget_Media_Image::render_control_template_scripts
    623623     */
    624     function test_render_control_template_scripts() {
     624    public function test_render_control_template_scripts() {
    625625        $widget = new WP_Widget_Media_Image();
    626626
Note: See TracChangeset for help on using the changeset viewer.