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/wpWidgetMediaVideo.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_Video::get_instance_schema
    3333     */
    34     function test_get_instance_schema() {
     34    public function test_get_instance_schema() {
    3535        $widget = new WP_Widget_Media_Video();
    3636        $schema = $widget->get_instance_schema();
     
    5959     * @ticket 45029
    6060     */
    61     function test_get_instance_schema_filtering() {
     61    public function test_get_instance_schema_filtering() {
    6262        $widget = new WP_Widget_Media_Video();
    6363        $schema = $widget->get_instance_schema();
     
    8989     * @covers WP_Widget_Media_Video::__construct
    9090     */
    91     function test_constructor() {
     91    public function test_constructor() {
    9292        $widget = new WP_Widget_Media_Video();
    9393
     
    118118     * @covers WP_Widget_Media_Video::update
    119119     */
    120     function test_update() {
     120    public function test_update() {
    121121        $widget   = new WP_Widget_Media_Video();
    122122        $instance = array();
     
    219219     * @covers WP_Widget_Media_Video::inject_video_max_width_style
    220220     */
    221     function test_render_media() {
     221    public function test_render_media() {
    222222        $test_movie_file = __FILE__ . '../../data/uploads/small-video.m4v';
    223223        $widget          = new WP_Widget_Media_Video();
     
    306306     * @covers WP_Widget_Media_Video::enqueue_preview_scripts
    307307     */
    308     function test_enqueue_preview_scripts() {
     308    public function test_enqueue_preview_scripts() {
    309309        global $wp_scripts, $wp_styles;
    310310        $widget = new WP_Widget_Media_Video();
     
    331331     * @covers WP_Widget_Media_Video::enqueue_admin_scripts
    332332     */
    333     function test_enqueue_admin_scripts() {
     333    public function test_enqueue_admin_scripts() {
    334334        set_current_screen( 'widgets.php' );
    335335        $widget = new WP_Widget_Media_Video();
     
    344344     * @covers WP_Widget_Media_Video::render_control_template_scripts
    345345     */
    346     function test_render_control_template_scripts() {
     346    public function test_render_control_template_scripts() {
    347347        $widget = new WP_Widget_Media_Video();
    348348
Note: See TracChangeset for help on using the changeset viewer.