Make WordPress Core

Ticket #39265: 39265-clean-covers-tags.patch

File 39265-clean-covers-tags.patch, 65.0 KB (added by jrf, 4 years ago)

Clean up some existing @covers tags. The () at the end is unnecessary and disregarded by PHPUnit, so can be removed.

  • tests/phpunit/tests/admin/includesTemplate.php

    From d73896a2241992f342d5388b5674a69f5cfc59d0 Mon Sep 17 00:00:00 2001
    From: jrfnl <jrfnl@users.noreply.github.com>
    Date: Mon, 24 Aug 2020 17:14:12 +0200
    Subject: [PATCH] Tests: use clean `@covers` tags
    
    The `()` at the end if unnecessary and disregarded by PHPUnit, so can be removed.
    ---
     .../phpunit/tests/admin/includesTemplate.php  |   4 +-
     .../tests/admin/wpPrivacyRequestsTable.php    |   2 +-
     tests/phpunit/tests/ajax/CustomizeManager.php |  16 +--
     tests/phpunit/tests/ajax/CustomizeMenus.php   |   4 +-
     .../tests/customize/custom-css-setting.php    |  14 +-
     tests/phpunit/tests/customize/manager.php     |  78 +++++------
     .../tests/customize/nav-menu-item-setting.php |   4 +-
     tests/phpunit/tests/customize/nav-menus.php   |  12 +-
     tests/phpunit/tests/dependencies/scripts.php  |   8 +-
     tests/phpunit/tests/general/wpError.php       | 128 +++++++++---------
     tests/phpunit/tests/post/nav-menu.php         |   2 +-
     tests/phpunit/tests/post/types.php            |  12 +-
     .../rest-block-renderer-controller.php        |  16 +--
     .../tests/rest-api/rest-posts-controller.php  |   2 +-
     tests/phpunit/tests/theme.php                 |   2 +-
     tests/phpunit/tests/widgets.php               |  22 +--
     .../tests/widgets/media-audio-widget.php      |   2 +-
     .../tests/widgets/media-gallery-widget.php    |  10 +-
     .../tests/widgets/media-image-widget.php      |   2 +-
     .../tests/widgets/media-video-widget.php      |  16 +--
     tests/phpunit/tests/widgets/media-widget.php  |  22 +--
     tests/phpunit/tests/widgets/text-widget.php   |   4 +-
     22 files changed, 191 insertions(+), 191 deletions(-)
    
    diff --git a/tests/phpunit/tests/admin/includesTemplate.php b/tests/phpunit/tests/admin/includesTemplate.php
    index a944615b8d..82f7ad3332 100644
    a b class Tests_Admin_includesTemplate extends WP_UnitTestCase { 
    131131         * Test calling get_settings_errors() with variations on where it gets errors from.
    132132         *
    133133         * @ticket 42498
    134          * @covers ::get_settings_errors()
     134         * @covers ::get_settings_errors
    135135         * @global array $wp_settings_errors
    136136         */
    137137        public function test_get_settings_errors_sources() {
    class Tests_Admin_includesTemplate extends WP_UnitTestCase { 
    171171
    172172        /**
    173173         * @ticket 44941
    174          * @covers ::settings_errors()
     174         * @covers ::settings_errors
    175175         * @global array $wp_settings_errors
    176176         * @dataProvider settings_errors_css_classes_provider
    177177         */
  • tests/phpunit/tests/admin/wpPrivacyRequestsTable.php

    diff --git a/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php b/tests/phpunit/tests/admin/wpPrivacyRequestsTable.php
    index b73701787c..e4823f21db 100644
    a b class Tests_Admin_WpPrivacyRequestsTable extends WP_UnitTestCase { 
    6161         * @param string      $expected Expected in SQL query.
    6262
    6363         * @dataProvider data_test_columns_should_be_sortable
    64          * @covers WP_Privacy_Requests_Table::prepare_items()
     64         * @covers WP_Privacy_Requests_Table::prepare_items
    6565         * @ticket 43960
    6666         */
    6767        public function test_columns_should_be_sortable( $order, $orderby, $search, $expected ) {
  • tests/phpunit/tests/ajax/CustomizeManager.php

    diff --git a/tests/phpunit/tests/ajax/CustomizeManager.php b/tests/phpunit/tests/ajax/CustomizeManager.php
    index 1126e8e667..e9a03de711 100644
    a b class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { 
    103103         * Test WP_Customize_Manager::save().
    104104         *
    105105         * @ticket 30937
    106          * @covers WP_Customize_Manager::save()
     106         * @covers WP_Customize_Manager::save
    107107         */
    108108        function test_save_failures() {
    109109                global $wp_customize;
    class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { 
    270270         * Test WP_Customize_Manager::save().
    271271         *
    272272         * @ticket 30937
    273          * @covers WP_Customize_Manager::save()
     273         * @covers WP_Customize_Manager::save
    274274         */
    275275        function test_save_success_publish_create() {
    276276                $wp_customize = $this->set_up_valid_state();
    class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { 
    299299         * Test WP_Customize_Manager::save().
    300300         *
    301301         * @ticket 30937
    302          * @covers WP_Customize_Manager::save()
     302         * @covers WP_Customize_Manager::save
    303303         */
    304304        function test_save_success_publish_edit() {
    305305                $uuid = wp_generate_uuid4();
    class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { 
    338338         * Test WP_Customize_Manager::save().
    339339         *
    340340         * @ticket 38943
    341          * @covers WP_Customize_Manager::save()
     341         * @covers WP_Customize_Manager::save
    342342         */
    343343        function test_success_save_post_date() {
    344344                $uuid         = wp_generate_uuid4();
    class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { 
    436436         * Test WP_Customize_Manager::save().
    437437         *
    438438         * @ticket 39896
    439          * @covers WP_Customize_Manager::save()
     439         * @covers WP_Customize_Manager::save
    440440         */
    441441        public function test_save_autosave() {
    442442                $uuid = wp_generate_uuid4();
    class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { 
    482482         * Test request for trashing a changeset.
    483483         *
    484484         * @ticket 39896
    485          * @covers WP_Customize_Manager::handle_changeset_trash_request()
     485         * @covers WP_Customize_Manager::handle_changeset_trash_request
    486486         */
    487487        public function test_handle_changeset_trash_request() {
    488488                $uuid         = wp_generate_uuid4();
    class Tests_Ajax_CustomizeManager extends WP_Ajax_UnitTestCase { 
    570570         * Test request for dismissing autosave changesets.
    571571         *
    572572         * @ticket 39896
    573          * @covers WP_Customize_Manager::handle_dismiss_autosave_or_lock_request()
    574          * @covers WP_Customize_Manager::dismiss_user_auto_draft_changesets()
     573         * @covers WP_Customize_Manager::handle_dismiss_autosave_or_lock_request
     574         * @covers WP_Customize_Manager::dismiss_user_auto_draft_changesets
    575575         */
    576576        public function test_handle_dismiss_autosave_or_lock_request() {
    577577                $uuid          = wp_generate_uuid4();
  • tests/phpunit/tests/ajax/CustomizeMenus.php

    diff --git a/tests/phpunit/tests/ajax/CustomizeMenus.php b/tests/phpunit/tests/ajax/CustomizeMenus.php
    index 6b16fea75f..09ca59fcc7 100644
    a b class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { 
    608608        /**
    609609         * Testing successful ajax_insert_auto_draft_post() call.
    610610         *
    611          * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post()
     611         * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post
    612612         */
    613613        function test_ajax_insert_auto_draft_post_success() {
    614614                $_POST                = wp_slash(
    class Tests_Ajax_CustomizeMenus extends WP_Ajax_UnitTestCase { 
    638638        /**
    639639         * Testing unsuccessful ajax_insert_auto_draft_post() call.
    640640         *
    641          * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post()
     641         * @covers WP_Customize_Nav_Menus::ajax_insert_auto_draft_post
    642642         */
    643643        function test_ajax_insert_auto_draft_failures() {
    644644                // No nonce.
  • tests/phpunit/tests/customize/custom-css-setting.php

    diff --git a/tests/phpunit/tests/customize/custom-css-setting.php b/tests/phpunit/tests/customize/custom-css-setting.php
    index c8ade41de8..f7b68c7af9 100644
    a b class Test_WP_Customize_Custom_CSS_Setting extends WP_UnitTestCase { 
    7575         *
    7676         * Also checks for the post type and the Setting Type.
    7777         *
    78          * @covers WP_Customize_Custom_CSS_Setting::__construct()
     78         * @covers WP_Customize_Custom_CSS_Setting::__construct
    7979         */
    8080        function test_construct() {
    8181                $this->assertTrue( post_type_exists( 'custom_css' ) );
    class Test_WP_Customize_Custom_CSS_Setting extends WP_UnitTestCase { 
    106106         * Test crud methods on WP_Customize_Custom_CSS_Setting.
    107107         *
    108108         * @covers ::wp_get_custom_css
    109          * @covers WP_Customize_Custom_CSS_Setting::value()
    110          * @covers WP_Customize_Custom_CSS_Setting::preview()
    111          * @covers WP_Customize_Custom_CSS_Setting::update()
     109         * @covers WP_Customize_Custom_CSS_Setting::value
     110         * @covers WP_Customize_Custom_CSS_Setting::preview
     111         * @covers WP_Customize_Custom_CSS_Setting::update
    112112         */
    113113        function test_crud() {
    114114
    class Test_WP_Customize_Custom_CSS_Setting extends WP_UnitTestCase { 
    266266        /**
    267267         * Test crud methods on WP_Customize_Custom_CSS_Setting.
    268268         *
    269          * @covers WP_Customize_Custom_CSS_Setting::value()
     269         * @covers WP_Customize_Custom_CSS_Setting::value
    270270         */
    271271        function test_value_filter() {
    272272                add_filter( 'customize_value_custom_css', array( $this, 'filter_value' ), 10, 2 );
    class Test_WP_Customize_Custom_CSS_Setting extends WP_UnitTestCase { 
    306306        /**
    307307         * Test update filter on WP_Customize_Custom_CSS_Setting.
    308308         *
    309          * @covers WP_Customize_Custom_CSS_Setting::update()
     309         * @covers WP_Customize_Custom_CSS_Setting::update
    310310         */
    311311        function test_update_filter() {
    312312                $original_css = 'body { color:red; }';
    class Test_WP_Customize_Custom_CSS_Setting extends WP_UnitTestCase { 
    364364         * Note that the $validity \WP_Error object must be reset each time
    365365         * as it picks up the Errors and passes them to the next assertion.
    366366         *
    367          * @covers WP_Customize_Custom_CSS_Setting::validate()
     367         * @covers WP_Customize_Custom_CSS_Setting::validate
    368368         */
    369369        function test_validate() {
    370370
  • tests/phpunit/tests/customize/manager.php

    diff --git a/tests/phpunit/tests/customize/manager.php b/tests/phpunit/tests/customize/manager.php
    index 4a9d5caead..f965eddd4e 100644
    a b class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    106106        /**
    107107         * Test WP_Customize_Manager::__construct().
    108108         *
    109          * @covers WP_Customize_Manager::__construct()
     109         * @covers WP_Customize_Manager::__construct
    110110         */
    111111        function test_constructor() {
    112112                $uuid              = wp_generate_uuid4();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    151151         * Test constructor when deferring UUID.
    152152         *
    153153         * @ticket 39896
    154          * @covers WP_Customize_Manager::establish_loaded_changeset()
    155          * @covers WP_Customize_Manager::__construct()
     154         * @covers WP_Customize_Manager::establish_loaded_changeset
     155         * @covers WP_Customize_Manager::__construct
    156156         */
    157157        public function test_constructor_deferred_changeset_uuid() {
    158158                wp_set_current_user( self::$admin_user_id );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    225225        /**
    226226         * Test WP_Customize_Manager::setup_theme() for admin screen.
    227227         *
    228          * @covers WP_Customize_Manager::setup_theme()
     228         * @covers WP_Customize_Manager::setup_theme
    229229         */
    230230        function test_setup_theme_in_customize_admin() {
    231231                global $pagenow, $wp_customize;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    294294        /**
    295295         * Test WP_Customize_Manager::setup_theme() for frontend.
    296296         *
    297          * @covers WP_Customize_Manager::setup_theme()
     297         * @covers WP_Customize_Manager::setup_theme
    298298         */
    299299        function test_setup_theme_in_frontend() {
    300300                global $wp_customize, $pagenow, $show_admin_bar;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    329329         * Test WP_Customize_Manager::settings_previewed().
    330330         *
    331331         * @ticket 39221
    332          * @covers WP_Customize_Manager::settings_previewed()
     332         * @covers WP_Customize_Manager::settings_previewed
    333333         */
    334334        function test_settings_previewed() {
    335335                $wp_customize = new WP_Customize_Manager( array( 'settings_previewed' => false ) );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    343343         * Test WP_Customize_Manager::autosaved().
    344344         *
    345345         * @ticket 39896
    346          * @covers WP_Customize_Manager::autosaved()
     346         * @covers WP_Customize_Manager::autosaved
    347347         */
    348348        public function test_autosaved() {
    349349                $wp_customize = new WP_Customize_Manager();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    360360         * Test WP_Customize_Manager::branching().
    361361         *
    362362         * @ticket 39896
    363          * @covers WP_Customize_Manager::branching()
     363         * @covers WP_Customize_Manager::branching
    364364         */
    365365        public function test_branching() {
    366366                $wp_customize = new WP_Customize_Manager();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    382382         * Test WP_Customize_Manager::changeset_uuid().
    383383         *
    384384         * @ticket 30937
    385          * @covers WP_Customize_Manager::changeset_uuid()
     385         * @covers WP_Customize_Manager::changeset_uuid
    386386         */
    387387        function test_changeset_uuid() {
    388388                $uuid         = wp_generate_uuid4();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    396396         * Ensure that post values are previewed even without being in preview.
    397397         *
    398398         * @ticket 30937
    399          * @covers WP_Customize_Manager::wp_loaded()
     399         * @covers WP_Customize_Manager::wp_loaded
    400400         */
    401401        function test_wp_loaded() {
    402402                wp_set_current_user( self::$admin_user_id );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    414414         * Test WP_Customize_Manager::find_changeset_post_id().
    415415         *
    416416         * @ticket 30937
    417          * @covers WP_Customize_Manager::find_changeset_post_id()
     417         * @covers WP_Customize_Manager::find_changeset_post_id
    418418         */
    419419        function test_find_changeset_post_id() {
    420420                $uuid    = wp_generate_uuid4();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    439439         * Test WP_Customize_Manager::changeset_post_id().
    440440         *
    441441         * @ticket 30937
    442          * @covers WP_Customize_Manager::changeset_post_id()
     442         * @covers WP_Customize_Manager::changeset_post_id
    443443         */
    444444        function test_changeset_post_id() {
    445445                $uuid         = wp_generate_uuid4();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    463463         * Test WP_Customize_Manager::changeset_data().
    464464         *
    465465         * @ticket 30937
    466          * @covers WP_Customize_Manager::changeset_data()
     466         * @covers WP_Customize_Manager::changeset_data
    467467         */
    468468        function test_changeset_data() {
    469469                wp_set_current_user( self::$admin_user_id );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    539539        /**
    540540         * Test WP_Customize_Manager::import_theme_starter_content().
    541541         *
    542          * @covers WP_Customize_Manager::import_theme_starter_content()
    543          * @covers WP_Customize_Manager::_save_starter_content_changeset()
     542         * @covers WP_Customize_Manager::import_theme_starter_content
     543         * @covers WP_Customize_Manager::_save_starter_content_changeset
    544544         */
    545545        function test_import_theme_starter_content() {
    546546                wp_set_current_user( self::$admin_user_id );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    808808         * Test WP_Customize_Manager::import_theme_starter_content() with nested arrays.
    809809         *
    810810         * @ticket 45484
    811          * @covers WP_Customize_Manager::import_theme_starter_content()
     811         * @covers WP_Customize_Manager::import_theme_starter_content
    812812         */
    813813        function test_import_theme_starter_content_with_nested_arrays() {
    814814                wp_set_current_user( self::$admin_user_id );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    882882         * Test WP_Customize_Manager::customize_preview_init().
    883883         *
    884884         * @ticket 30937
    885          * @covers WP_Customize_Manager::customize_preview_init()
     885         * @covers WP_Customize_Manager::customize_preview_init
    886886         */
    887887        function test_customize_preview_init() {
    888888
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    927927         *
    928928         * @ticket 30937
    929929         * @ticket 40020
    930          * @covers WP_Customize_Manager::filter_iframe_security_headers()
     930         * @covers WP_Customize_Manager::filter_iframe_security_headers
    931931         */
    932932        function test_filter_iframe_security_headers() {
    933933                $wp_customize = new WP_Customize_Manager();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    942942         * Test WP_Customize_Manager::add_state_query_params().
    943943         *
    944944         * @ticket 30937
    945          * @covers WP_Customize_Manager::add_state_query_params()
     945         * @covers WP_Customize_Manager::add_state_query_params
    946946         */
    947947        function test_add_state_query_params() {
    948948                $preview_theme = $this->get_inactive_core_theme();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    10011001         * Test WP_Customize_Manager::save_changeset_post().
    10021002         *
    10031003         * @ticket 30937
    1004          * @covers WP_Customize_Manager::save_changeset_post()
     1004         * @covers WP_Customize_Manager::save_changeset_post
    10051005         */
    10061006        function test_save_changeset_post_without_theme_activation() {
    10071007                global $wp_customize;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    12431243        /**
    12441244         * Test saving changeset post without Kses or other content_save_pre filters mutating content.
    12451245         *
    1246          * @covers WP_Customize_Manager::save_changeset_post()
     1246         * @covers WP_Customize_Manager::save_changeset_post
    12471247         */
    12481248        public function test_save_changeset_post_without_kses_corrupting_json() {
    12491249                global $wp_customize;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    14461446         * Test WP_Customize_Manager::save_changeset_post().
    14471447         *
    14481448         * @ticket 30937
    1449          * @covers WP_Customize_Manager::save_changeset_post()
    1450          * @covers WP_Customize_Manager::update_stashed_theme_mod_settings()
     1449         * @covers WP_Customize_Manager::save_changeset_post
     1450         * @covers WP_Customize_Manager::update_stashed_theme_mod_settings
    14511451         */
    14521452        function test_save_changeset_post_with_theme_activation() {
    14531453                global $wp_customize;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    14851485         * Test saving changesets with varying users and capabilities.
    14861486         *
    14871487         * @ticket 38705
    1488          * @covers WP_Customize_Manager::save_changeset_post()
     1488         * @covers WP_Customize_Manager::save_changeset_post
    14891489         */
    14901490        function test_save_changeset_post_with_varying_users() {
    14911491                global $wp_customize;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    16601660         *
    16611661         * @ticket 31089
    16621662         * @see wp_delete_auto_drafts()
    1663          * @covers WP_Customize_Manager::save_changeset_post()
     1663         * @covers WP_Customize_Manager::save_changeset_post
    16641664         */
    16651665        function test_save_changeset_post_dumping_auto_draft_date() {
    16661666                global $wp_customize;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    17001700         * Test writing changesets when user supplies unchanged values.
    17011701         *
    17021702         * @ticket 38865
    1703          * @covers WP_Customize_Manager::save_changeset_post()
     1703         * @covers WP_Customize_Manager::save_changeset_post
    17041704         */
    17051705        function test_save_changeset_post_with_unchanged_values() {
    17061706                global $wp_customize;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    17901790         * Test writing changesets when user supplies unchanged values.
    17911791         *
    17921792         * @ticket 39896
    1793          * @covers WP_Customize_Manager::save_changeset_post()
    1794          * @covers WP_Customize_Manager::grant_edit_post_capability_for_changeset()
     1793         * @covers WP_Customize_Manager::save_changeset_post
     1794         * @covers WP_Customize_Manager::grant_edit_post_capability_for_changeset
    17951795         */
    17961796        public function test_save_changeset_post_with_autosave() {
    17971797                wp_set_current_user( self::$admin_user_id );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    19001900         * Test passing `null` for a setting ID to remove it from the changeset.
    19011901         *
    19021902         * @ticket 41621
    1903          * @covers WP_Customize_Manager::save_changeset_post()
     1903         * @covers WP_Customize_Manager::save_changeset_post
    19041904         */
    19051905        function test_remove_setting_from_changeset_post() {
    19061906                $uuid = wp_generate_uuid4();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    19361936         * Test writing changesets and publishing with users who can unfiltered_html and those who cannot.
    19371937         *
    19381938         * @ticket 38705
    1939          * @covers WP_Customize_Manager::save_changeset_post()
     1939         * @covers WP_Customize_Manager::save_changeset_post
    19401940         */
    19411941        function test_save_changeset_post_with_varying_unfiltered_html_cap() {
    19421942                global $wp_customize;
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    20062006         * publishing
    20072007         *
    20082008         * @ticket 39221
    2009          * @covers ::_wp_customize_publish_changeset()
     2009         * @covers ::_wp_customize_publish_changeset
    20102010         * @see WP_Customize_Widgets::schedule_customize_register()
    20112011         * @see WP_Customize_Widgets::customize_register()
    20122012         */
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    21922192         * Test WP_Customize_Manager::is_cross_domain().
    21932193         *
    21942194         * @ticket 30937
    2195          * @covers WP_Customize_Manager::is_cross_domain()
     2195         * @covers WP_Customize_Manager::is_cross_domain
    21962196         */
    21972197        function test_is_cross_domain() {
    21982198                $wp_customize = new WP_Customize_Manager();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    22102210         * Test WP_Customize_Manager::get_allowed_urls().
    22112211         *
    22122212         * @ticket 30937
    2213          * @covers WP_Customize_Manager::get_allowed_urls()
     2213         * @covers WP_Customize_Manager::get_allowed_urls
    22142214         */
    22152215        function test_get_allowed_urls() {
    22162216                $wp_customize = new WP_Customize_Manager();
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    22932293         * Test WP_Customize_Manager::unsanitized_post_values().
    22942294         *
    22952295         * @ticket 30937
    2296          * @covers WP_Customize_Manager::unsanitized_post_values()
     2296         * @covers WP_Customize_Manager::unsanitized_post_values
    22972297         */
    22982298        function test_unsanitized_post_values_with_changeset_and_stashed_theme_mods() {
    22992299                wp_set_current_user( self::$admin_user_id );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    26072607         * Test WP_Customize_Manager::validate_setting_values().
    26082608         *
    26092609         * @ticket 37638
    2610          * @covers WP_Customize_Manager::validate_setting_values()
     2610         * @covers WP_Customize_Manager::validate_setting_values
    26112611         */
    26122612        function test_late_validate_setting_values() {
    26132613                $setting = new Test_Setting_Without_Applying_Validate_Filter( $this->manager, 'required' );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    26332633         * Test WP_Customize_Manager::validate_setting_values().
    26342634         *
    26352635         * @ticket 30937
    2636          * @covers WP_Customize_Manager::validate_setting_values()
     2636         * @covers WP_Customize_Manager::validate_setting_values
    26372637         */
    26382638        function test_validate_setting_values_args() {
    26392639                wp_set_current_user( self::$admin_user_id );
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    28142814         * Test WP_Customize_Manager::has_published_pages().
    28152815         *
    28162816         * @ticket 38013
    2817          * @covers WP_Customize_Manager::has_published_pages()
     2817         * @covers WP_Customize_Manager::has_published_pages
    28182818         */
    28192819        function test_has_published_pages() {
    28202820                foreach ( get_pages() as $page ) {
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    28432843         * Ensure that page stubs created via nav menus will cause has_published_pages to return true.
    28442844         *
    28452845         * @ticket 38013
    2846          * @covers WP_Customize_Manager::has_published_pages()
     2846         * @covers WP_Customize_Manager::has_published_pages
    28472847         */
    28482848        function test_has_published_pages_when_nav_menus_created_posts() {
    28492849                foreach ( get_pages() as $page ) {
    class Tests_WP_Customize_Manager extends WP_UnitTestCase { 
    31153115         * Test remove_frameless_preview_messenger_channel.
    31163116         *
    31173117         * @ticket 38867
    3118          * @covers WP_Customize_Manager::remove_frameless_preview_messenger_channel()
     3118         * @covers WP_Customize_Manager::remove_frameless_preview_messenger_channel
    31193119         */
    31203120        function test_remove_frameless_preview_messenger_channel() {
    31213121                wp_set_current_user( self::$admin_user_id );
  • tests/phpunit/tests/customize/nav-menu-item-setting.php

    diff --git a/tests/phpunit/tests/customize/nav-menu-item-setting.php b/tests/phpunit/tests/customize/nav-menu-item-setting.php
    index c80ce613b4..f39eba07af 100644
    a b class Test_WP_Customize_Nav_Menu_Item_Setting extends WP_UnitTestCase { 
    944944         * Test WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item() to set url for posts, terms, and post type archives.
    945945         *
    946946         * @ticket 38945
    947          * @covers WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item()
     947         * @covers WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item
    948948         */
    949949        function test_value_as_wp_post_nav_menu_item_term_urls() {
    950950                $term_id = self::factory()->term->create( array( 'taxonomy' => 'category' ) );
    class Test_WP_Customize_Nav_Menu_Item_Setting extends WP_UnitTestCase { 
    10171017         * Test WP_Customize_Nav_Menu_Item_Setting::value_as_wp_post_nav_menu_item() for obtaining original title.
    10181018         *
    10191019         * @ticket 38945
    1020          * @covers WP_Customize_Nav_Menu_Item_Setting::get_original_title()
     1020         * @covers WP_Customize_Nav_Menu_Item_Setting::get_original_title
    10211021         */
    10221022        function test_get_original_title() {
    10231023                $menu_id = wp_create_nav_menu( 'Menu' );
  • tests/phpunit/tests/customize/nav-menus.php

    diff --git a/tests/phpunit/tests/customize/nav-menus.php b/tests/phpunit/tests/customize/nav-menus.php
    index bb82db7e48..4b9b8ca925 100644
    a b class Test_WP_Customize_Nav_Menus extends WP_UnitTestCase { 
    661661        /**
    662662         * Test insert_auto_draft_post method.
    663663         *
    664          * @covers WP_Customize_Nav_Menus::insert_auto_draft_post()
     664         * @covers WP_Customize_Nav_Menus::insert_auto_draft_post
    665665         */
    666666        public function test_insert_auto_draft_post() {
    667667                $menus = new WP_Customize_Nav_Menus( $this->wp_customize );
    class Test_WP_Customize_Nav_Menus extends WP_UnitTestCase { 
    835835        /**
    836836         * Test make_auto_draft_status_previewable.
    837837         *
    838          * @covers WP_Customize_Nav_Menus::make_auto_draft_status_previewable()
     838         * @covers WP_Customize_Nav_Menus::make_auto_draft_status_previewable
    839839         */
    840840        function test_make_auto_draft_status_previewable() {
    841841                global $wp_post_statuses;
    class Test_WP_Customize_Nav_Menus extends WP_UnitTestCase { 
    847847        /**
    848848         * Test sanitize_nav_menus_created_posts.
    849849         *
    850          * @covers WP_Customize_Nav_Menus::sanitize_nav_menus_created_posts()
     850         * @covers WP_Customize_Nav_Menus::sanitize_nav_menus_created_posts
    851851         */
    852852        function test_sanitize_nav_menus_created_posts() {
    853853                $menus                 = new WP_Customize_Nav_Menus( $this->wp_customize );
    class Test_WP_Customize_Nav_Menus extends WP_UnitTestCase { 
    921921        /**
    922922         * Test save_nav_menus_created_posts.
    923923         *
    924          * @covers WP_Customize_Nav_Menus::save_nav_menus_created_posts()
     924         * @covers WP_Customize_Nav_Menus::save_nav_menus_created_posts
    925925         */
    926926        function test_save_nav_menus_created_posts() {
    927927                $menus = new WP_Customize_Nav_Menus( $this->wp_customize );
    class Test_WP_Customize_Nav_Menus extends WP_UnitTestCase { 
    11141114        /**
    11151115         * Test the filter_wp_nav_menu method.
    11161116         *
    1117          * @covers WP_Customize_Nav_Menus::filter_wp_nav_menu()
    1118          * @covers WP_Customize_Nav_Menus::filter_wp_nav_menu_args()
     1117         * @covers WP_Customize_Nav_Menus::filter_wp_nav_menu
     1118         * @covers WP_Customize_Nav_Menus::filter_wp_nav_menu_args
    11191119         */
    11201120        function test_filter_wp_nav_menu() {
    11211121                do_action( 'customize_register', $this->wp_customize );
  • tests/phpunit/tests/dependencies/scripts.php

    diff --git a/tests/phpunit/tests/dependencies/scripts.php b/tests/phpunit/tests/dependencies/scripts.php
    index 20489390d6..a3f9c1e163 100644
    a b JS; 
    10451045         * Testing `wp_enqueue_code_editor` with file path.
    10461046         *
    10471047         * @ticket 41871
    1048          * @covers ::wp_enqueue_code_editor()
     1048         * @covers ::wp_enqueue_code_editor
    10491049         */
    10501050        public function test_wp_enqueue_code_editor_when_php_file_will_be_passed() {
    10511051                $real_file              = WP_PLUGIN_DIR . '/hello.php';
    JS; 
    11321132         * Testing `wp_enqueue_code_editor` with `compact`.
    11331133         *
    11341134         * @ticket 41871
    1135          * @covers ::wp_enqueue_code_editor()
     1135         * @covers ::wp_enqueue_code_editor
    11361136         */
    11371137        public function test_wp_enqueue_code_editor_when_generated_array_by_compact_will_be_passed() {
    11381138                $file                   = '';
    JS; 
    12151215         * Testing `wp_enqueue_code_editor` with `array_merge`.
    12161216         *
    12171217         * @ticket 41871
    1218          * @covers ::wp_enqueue_code_editor()
     1218         * @covers ::wp_enqueue_code_editor
    12191219         */
    12201220        public function test_wp_enqueue_code_editor_when_generated_array_by_array_merge_will_be_passed() {
    12211221                $wp_enqueue_code_editor = wp_enqueue_code_editor(
    JS; 
    13121312         * Testing `wp_enqueue_code_editor` with `array`.
    13131313         *
    13141314         * @ticket 41871
    1315          * @covers ::wp_enqueue_code_editor()
     1315         * @covers ::wp_enqueue_code_editor
    13161316         */
    13171317        public function test_wp_enqueue_code_editor_when_simple_array_will_be_passed() {
    13181318                $wp_enqueue_code_editor = wp_enqueue_code_editor(
  • tests/phpunit/tests/general/wpError.php

    diff --git a/tests/phpunit/tests/general/wpError.php b/tests/phpunit/tests/general/wpError.php
    index 3fccc470c8..72a575fbf7 100644
    a b class Tests_WP_Error extends WP_UnitTestCase { 
    100100        }
    101101
    102102        /**
    103          * @covers ::get_error_codes()
     103         * @covers ::get_error_codes
    104104         */
    105105        public function test_get_error_codes_with_no_errors_should_return_empty_array() {
    106106                $this->assertEmpty( $this->wp_error->get_error_codes() );
    107107        }
    108108
    109109        /**
    110          * @covers ::get_error_codes()
     110         * @covers ::get_error_codes
    111111         */
    112112        public function test_get_error_codes_with_one_error_should_return_an_array_with_only_that_code() {
    113113                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    116116        }
    117117
    118118        /**
    119          * @covers ::get_error_codes()
     119         * @covers ::get_error_codes
    120120         */
    121121        public function test_get_error_codes_with_multiple_errors_should_return_an_array_of_those_codes() {
    122122                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    128128        }
    129129
    130130        /**
    131          * @covers ::get_error_code()
     131         * @covers ::get_error_code
    132132         */
    133133        public function test_get_error_code_with_no_errors_should_return_an_empty_string() {
    134134                $this->assertSame( '', $this->wp_error->get_error_code() );
    135135        }
    136136
    137137        /**
    138          * @covers ::get_error_code()
     138         * @covers ::get_error_code
    139139         */
    140140        public function test_get_error_code_with_one_error_should_return_that_error_code() {
    141141                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    144144        }
    145145
    146146        /**
    147          * @covers ::get_error_code()
     147         * @covers ::get_error_code
    148148         */
    149149        public function test_get_error_code_with_multiple_errors_should_return_only_the_first_error_code() {
    150150                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    154154        }
    155155
    156156        /**
    157          * @covers ::get_error_messages()
     157         * @covers ::get_error_messages
    158158         */
    159159        public function test_get_error_messages_with_empty_code_and_no_errors_should_return_an_empty_array() {
    160160                $this->assertEmpty( $this->wp_error->get_error_messages() );
    161161        }
    162162
    163163        /**
    164          * @covers ::get_error_messages()
     164         * @covers ::get_error_messages
    165165         */
    166166        public function test_get_error_messages_with_empty_code_one_error_should_return_an_array_with_that_message() {
    167167                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    170170        }
    171171
    172172        /**
    173          * @covers ::get_error_messages()
     173         * @covers ::get_error_messages
    174174         */
    175175        public function test_get_error_messages_with_empty_code_multiple_errors_should_return_an_array_of_messages() {
    176176                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    180180        }
    181181
    182182        /**
    183          * @covers ::get_error_messages()
     183         * @covers ::get_error_messages
    184184         */
    185185        public function test_get_error_messages_with_an_invalid_code_should_return_an_empty_array() {
    186186                $this->assertEmpty( $this->wp_error->get_error_messages( 'code' ) );
    187187        }
    188188
    189189        /**
    190          * @covers ::get_error_messages()
     190         * @covers ::get_error_messages
    191191         */
    192192        public function test_get_error_messages_with_one_error_should_return_an_array_with_that_message() {
    193193                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    196196        }
    197197
    198198        /**
    199          * @covers ::get_error_messages()
     199         * @covers ::get_error_messages
    200200         */
    201201        public function test_get_error_messages_with_multiple_errors_same_code_should_return_an_array_with_all_messages() {
    202202                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    206206        }
    207207
    208208        /**
    209          * @covers ::get_error_message()
     209         * @covers ::get_error_message
    210210         */
    211211        public function test_get_error_message_with_empty_code_and_no_errors_should_return_an_empty_string() {
    212212                $this->assertSame( '', $this->wp_error->get_error_message() );
    213213        }
    214214
    215215        /**
    216          * @covers ::get_error_message()
     216         * @covers ::get_error_message
    217217         */
    218218        public function test_get_error_message_with_empty_code_and_one_error_should_return_that_message() {
    219219                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    222222        }
    223223
    224224        /**
    225          * @covers ::get_error_message()
     225         * @covers ::get_error_message
    226226         */
    227227        public function test_get_error_message_with_empty_code_and_multiple_errors_should_return_the_first_message() {
    228228                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    232232        }
    233233
    234234        /**
    235          * @covers ::get_error_message()
     235         * @covers ::get_error_message
    236236         */
    237237        public function test_get_error_message_with_empty_code_and_multiple_errors_multiple_codes_should_return_the_first_message() {
    238238                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    243243        }
    244244
    245245        /**
    246          * @covers ::get_error_message()
     246         * @covers ::get_error_message
    247247         */
    248248        public function test_get_error_message_with_invalid_code_and_no_errors_should_return_empty_string() {
    249249                $this->assertSame( '', $this->wp_error->get_error_message( 'invalid' ) );
    250250        }
    251251
    252252        /**
    253          * @covers ::get_error_message()
     253         * @covers ::get_error_message
    254254         */
    255255        public function test_get_error_message_with_invalid_code_and_one_error_should_return_an_empty_string() {
    256256                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    259259        }
    260260
    261261        /**
    262          * @covers ::get_error_message()
     262         * @covers ::get_error_message
    263263         */
    264264        public function test_get_error_message_with_invalid_code_and_multiple_errors_should_return_an_empty_string() {
    265265                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    269269        }
    270270
    271271        /**
    272          * @covers ::get_error_data()
     272         * @covers ::get_error_data
    273273         */
    274274        public function test_get_error_data_with_empty_code_and_no_errors_should_evaluate_as_null() {
    275275                $this->assertSame( null, $this->wp_error->get_error_data() );
    276276        }
    277277
    278278        /**
    279          * @covers ::get_error_data()
     279         * @covers ::get_error_data
    280280         */
    281281        public function test_get_error_data_with_empty_code_one_error_no_data_should_evaluate_as_null() {
    282282                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    285285        }
    286286
    287287        /**
    288          * @covers ::get_error_data()
     288         * @covers ::get_error_data
    289289         */
    290290        public function test_get_error_data_with_empty_code_multiple_errors_no_data_should_evaluate_as_null() {
    291291                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    295295        }
    296296
    297297        /**
    298          * @covers ::get_error_data()
     298         * @covers ::get_error_data
    299299         */
    300300        public function test_get_error_data_with_empty_code_and_one_error_with_data_should_return_that_data() {
    301301                $expected = array( 'data-key' => 'data-value' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    305305        }
    306306
    307307        /**
    308          * @covers ::get_error_data()
     308         * @covers ::get_error_data
    309309         */
    310310        public function test_get_error_data_with_empty_code_and_multiple_errors_different_codes_should_return_the_last_data_of_the_first_code() {
    311311                $expected = array( 'data-key' => 'data-value' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    316316        }
    317317
    318318        /**
    319          * @covers ::get_error_data()
     319         * @covers ::get_error_data
    320320         */
    321321        public function test_get_error_data_with_empty_code_and_multiple_errors_same_code_should_return_the_last_data_of_the_first_code() {
    322322                $this->wp_error->add( 'code', 'message', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    327327        }
    328328
    329329        /**
    330          * @covers ::get_error_data()
     330         * @covers ::get_error_data
    331331         */
    332332        public function test_get_error_data_with_code_and_no_errors_should_evaluate_as_null() {
    333333                $this->assertSame( null, $this->wp_error->get_error_data( 'code' ) );
    334334        }
    335335
    336336        /**
    337          * @covers ::get_error_data()
     337         * @covers ::get_error_data
    338338         */
    339339        public function test_get_error_data_with_code_and_one_error_with_no_data_should_evaluate_as_null() {
    340340                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    343343        }
    344344
    345345        /**
    346          * @covers ::get_error_data()
     346         * @covers ::get_error_data
    347347         */
    348348        public function test_get_error_data_with_code_and_one_error_with_data_should_return_that_data() {
    349349                $expected = array( 'data-key' => 'data-value' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    353353        }
    354354
    355355        /**
    356          * @covers ::get_error_data()
     356         * @covers ::get_error_data
    357357         */
    358358        public function test_get_error_data_with_code_and_multiple_errors_different_codes_should_return_the_last_stored_data_of_the_code() {
    359359                $expected = array( 'data3' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    365365        }
    366366
    367367        /**
    368          * @covers ::get_error_data()
     368         * @covers ::get_error_data
    369369         */
    370370        public function test_get_error_data_with_code_and_multiple_errors_same_code_should_return_the_last_stored_data() {
    371371                $this->wp_error->add( 'code', 'message', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    376376        }
    377377
    378378        /**
    379          * @covers ::has_errors()
     379         * @covers ::has_errors
    380380         */
    381381        public function test_has_errors_with_no_errors_returns_false() {
    382382                $this->assertFalse( $this->wp_error->has_errors() );
    383383        }
    384384
    385385        /**
    386          * @covers ::has_errors()
     386         * @covers ::has_errors
    387387         */
    388388        public function test_has_errors_with_errors_returns_true() {
    389389                $this->wp_error->add( 'code', 'message', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    391391        }
    392392
    393393        /**
    394          * @covers ::add()
     394         * @covers ::add
    395395         */
    396396        public function test_add_with_empty_code_empty_message_empty_data_should_add_empty_key_to_errors_array() {
    397397                $this->wp_error->add( '', '', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    400400        }
    401401
    402402        /**
    403          * @covers ::add()
     403         * @covers ::add
    404404         */
    405405        public function test_add_with_empty_code_empty_message_empty_data_should_add_empty_message_to_errors_array_under_empty_key() {
    406406                $this->wp_error->add( '', '', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    409409        }
    410410
    411411        /**
    412          * @covers ::add()
     412         * @covers ::add
    413413         */
    414414        public function test_add_with_empty_code_empty_message_empty_data_should_not_alter_data() {
    415415                $this->wp_error->add( '', '', '' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    418418        }
    419419
    420420        /**
    421          * @covers ::add()
     421         * @covers ::add
    422422         */
    423423        public function test_add_with_empty_code_empty_message_non_empty_data_should_store_data_under_an_empty_code_key() {
    424424                $this->wp_error->add( '', '', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    427427        }
    428428
    429429        /**
    430          * @covers ::add()
     430         * @covers ::add
    431431         */
    432432        public function test_add_with_code_empty_message_empty_data_should_add_error_with_code() {
    433433                $this->wp_error->add( 'code', '' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    436436        }
    437437
    438438        /**
    439          * @covers ::add()
     439         * @covers ::add
    440440         */
    441441        public function test_add_with_code_empty_message_empty_data_should_add_error_with_empty_message() {
    442442                $this->wp_error->add( 'code', '' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    445445        }
    446446
    447447        /**
    448          * @covers ::add()
     448         * @covers ::add
    449449         */
    450450        public function test_add_with_code_empty_message_empty_data_should_not_add_error_data() {
    451451                $this->wp_error->add( 'code', '' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    454454        }
    455455
    456456        /**
    457          * @covers ::add()
     457         * @covers ::add
    458458         */
    459459        public function test_add_with_code_and_message_and_empty_data_should_should_add_error_with_that_message() {
    460460                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    463463        }
    464464
    465465        /**
    466          * @covers ::add()
     466         * @covers ::add
    467467         */
    468468        public function test_add_with_code_and_message_and_empty_data_should_not_alter_stored_data() {
    469469                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    472472        }
    473473
    474474        /**
    475          * @covers ::add()
     475         * @covers ::add
    476476         */
    477477        public function test_add_with_code_and_empty_message_and_data_should_add_error_with_that_code() {
    478478                $this->wp_error->add( 'code', '', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    481481        }
    482482
    483483        /**
    484          * @covers ::add()
     484         * @covers ::add
    485485         */
    486486        public function test_add_with_code_and_empty_message_and_data_should_store_that_data() {
    487487                $this->wp_error->add( 'code', '', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    490490        }
    491491
    492492        /**
    493          * @covers ::add()
     493         * @covers ::add
    494494         */
    495495        public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_code() {
    496496                $this->wp_error->add( 'code', 'message', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    499499        }
    500500
    501501        /**
    502          * @covers ::add()
     502         * @covers ::add
    503503         */
    504504        public function test_add_with_code_and_message_and_data_should_add_an_error_with_that_message() {
    505505                $this->wp_error->add( 'code', 'message', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    508508        }
    509509
    510510        /**
    511          * @covers ::add()
     511         * @covers ::add
    512512         */
    513513        public function test_add_with_code_and_message_and_data_should_store_that_data() {
    514514                $this->wp_error->add( 'code', 'message', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    517517        }
    518518
    519519        /**
    520          * @covers ::add()
     520         * @covers ::add
    521521         */
    522522        public function test_add_multiple_times_with_the_same_code_should_add_additional_messages_for_that_code() {
    523523                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    529529        }
    530530
    531531        /**
    532          * @covers ::add()
     532         * @covers ::add
    533533         */
    534534        public function test_add_multiple_times_with_the_same_code_and_different_data_should_store_only_the_last_added_data() {
    535535                $this->wp_error->add( 'code', 'message', 'data-bar' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    539539        }
    540540
    541541        /**
    542          * @covers ::add_data()
     542         * @covers ::add_data
    543543         */
    544544        public function test_add_data_with_empty_data_empty_code_should_create_orphaned_data_with_no_error() {
    545545                $this->wp_error->add_data( '' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    548548        }
    549549
    550550        /**
    551          * @covers ::add_data()
     551         * @covers ::add_data
    552552         */
    553553        public function test_add_data_with_empty_data_empty_code_no_errors_should_create_data_under_an_empty_code_key() {
    554554                $this->wp_error->add_data( '' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    557557        }
    558558
    559559        /**
    560          * @covers ::add_data()
     560         * @covers ::add_data
    561561         */
    562562        public function test_add_data_with_data_empty_code_and_one_error_should_store_the_data_under_that_code() {
    563563                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    567567        }
    568568
    569569        /**
    570          * @covers ::add_data()
     570         * @covers ::add_data
    571571         */
    572572        public function test_add_data_with_data_empty_code_and_multiple_errors_with_different_codes_should_store_it_under_the_first_code() {
    573573                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    579579        }
    580580
    581581        /**
    582          * @covers ::add_data()
     582         * @covers ::add_data
    583583         */
    584584        public function test_add_data_with_data_empty_code_and_multiple_errors_with_same_code_should_store_it_under_the_first_code() {
    585585                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    592592        }
    593593
    594594        /**
    595          * @covers ::add_data()
     595         * @covers ::add_data
    596596         */
    597597        public function test_add_data_with_data_and_code_and_no_errors_should_create_orphaned_data_with_no_error() {
    598598                $this->wp_error->add_data( 'data', 'code' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    601601        }
    602602
    603603        /**
    604          * @covers ::add_data()
     604         * @covers ::add_data
    605605         */
    606606        public function test_add_data_with_data_and_code_no_errors_should_create_data_under_that_code_key() {
    607607                $this->wp_error->add_data( 'data', 'code' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    610610        }
    611611
    612612        /**
    613          * @covers ::add_data()
     613         * @covers ::add_data
    614614         */
    615615        public function test_add_data_with_data_and_code_one_error_different_code_should_create_orphaned_data_with_no_error() {
    616616                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    621621        }
    622622
    623623        /**
    624          * @covers ::add_data()
     624         * @covers ::add_data
    625625         */
    626626        public function test_add_data_with_data_and_code_one_error_different_code_should_create_data_under_that_code_key() {
    627627                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    632632        }
    633633
    634634        /**
    635          * @covers ::add_data()
     635         * @covers ::add_data
    636636         */
    637637        public function test_add_data_with_data_and_code_should_add_data() {
    638638                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    643643        }
    644644
    645645        /**
    646          * @covers ::remove()
     646         * @covers ::remove
    647647         */
    648648        public function test_remove_with_no_errors_should_affect_nothing() {
    649649                $before = $this->wp_error->errors;
    class Tests_WP_Error extends WP_UnitTestCase { 
    656656        }
    657657
    658658        /**
    659          * @covers ::remove()
     659         * @covers ::remove
    660660         */
    661661        public function test_remove_empty_code_no_errors_should_affect_nothing() {
    662662                $before = $this->wp_error->errors;
    class Tests_WP_Error extends WP_UnitTestCase { 
    669669        }
    670670
    671671        /**
    672          * @covers ::remove()
     672         * @covers ::remove
    673673         */
    674674        public function test_remove_empty_code_and_one_error_with_empty_string_code_should_remove_error() {
    675675                $before = $this->wp_error->errors;
    class Tests_WP_Error extends WP_UnitTestCase { 
    684684        }
    685685
    686686        /**
    687          * @covers ::remove()
     687         * @covers ::remove
    688688         */
    689689        public function test_remove_empty_code_and_one_error_with_empty_string_code_should_remove_error_data() {
    690690                $this->wp_error->add( '', 'message', 'data' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    697697        }
    698698
    699699        /**
    700          * @covers ::remove()
     700         * @covers ::remove
    701701         */
    702702        public function test_remove_should_remove_the_error_with_the_given_code() {
    703703                $this->wp_error->add( 'code', 'message' );
    class Tests_WP_Error extends WP_UnitTestCase { 
    708708        }
    709709
    710710        /**
    711          * @covers ::remove()
     711         * @covers ::remove
    712712         */
    713713        public function test_remove_should_remove_the_error_data_associated_with_the_given_code() {
    714714                $this->wp_error->add( 'code', 'message', 'data' );
  • tests/phpunit/tests/post/nav-menu.php

    diff --git a/tests/phpunit/tests/post/nav-menu.php b/tests/phpunit/tests/post/nav-menu.php
    index 7ae35e34d9..641b423cc1 100644
    a b class Test_Nav_Menus extends WP_UnitTestCase { 
    679679        /**
    680680         * Test _wp_delete_customize_changeset_dependent_auto_drafts.
    681681         *
    682          * @covers ::_wp_delete_customize_changeset_dependent_auto_drafts()
     682         * @covers ::_wp_delete_customize_changeset_dependent_auto_drafts
    683683         */
    684684        function test_wp_delete_customize_changeset_dependent_auto_drafts() {
    685685                $auto_draft_post_id = $this->factory()->post->create(
  • tests/phpunit/tests/post/types.php

    diff --git a/tests/phpunit/tests/post/types.php b/tests/phpunit/tests/post/types.php
    index dfd5910a2b..4a74cfefbd 100644
    a b class Tests_Post_Types extends WP_UnitTestCase { 
    6868
    6969        /**
    7070         * @ticket 35985
    71          * @covers ::register_post_type()
     71         * @covers ::register_post_type
    7272         */
    7373        function test_register_post_type_exclude_from_search_should_default_to_opposite_value_of_public() {
    7474                /*
    class Tests_Post_Types extends WP_UnitTestCase { 
    8282
    8383        /**
    8484         * @ticket 35985
    85          * @covers ::register_post_type()
     85         * @covers ::register_post_type
    8686         */
    8787        function test_register_post_type_publicly_queryable_should_default_to_value_of_public() {
    8888                /*
    class Tests_Post_Types extends WP_UnitTestCase { 
    9696
    9797        /**
    9898         * @ticket 35985
    99          * @covers ::register_post_type()
     99         * @covers ::register_post_type
    100100         */
    101101        function test_register_post_type_show_ui_should_default_to_value_of_public() {
    102102                /*
    class Tests_Post_Types extends WP_UnitTestCase { 
    110110
    111111        /**
    112112         * @ticket 35985
    113          * @covers ::register_post_type()
     113         * @covers ::register_post_type
    114114         */
    115115        function test_register_post_type_show_in_menu_should_default_to_value_of_show_ui() {
    116116                /*
    class Tests_Post_Types extends WP_UnitTestCase { 
    129129
    130130        /**
    131131         * @ticket 35985
    132          * @covers ::register_post_type()
     132         * @covers ::register_post_type
    133133         */
    134134        function test_register_post_type_show_in_nav_menus_should_default_to_value_of_public() {
    135135                /*
    class Tests_Post_Types extends WP_UnitTestCase { 
    143143
    144144        /**
    145145         * @ticket 35985
    146          * @covers ::register_post_type()
     146         * @covers ::register_post_type
    147147         */
    148148        function test_register_post_type_show_in_admin_bar_should_default_to_value_of_show_in_menu() {
    149149                /*
  • tests/phpunit/tests/rest-api/rest-block-renderer-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php b/tests/phpunit/tests/rest-api/rest-block-renderer-controller.php
    index 94c7cf8103..8fc64c0f60 100644
    a b class REST_Block_Renderer_Controller_Test extends WP_Test_REST_Controller_Testca 
    258258         *
    259259         * @ticket 45098
    260260         *
    261          * @covers WP_REST_Block_Renderer_Controller::register_routes()
     261         * @covers WP_REST_Block_Renderer_Controller::register_routes
    262262         */
    263263        public function test_register_routes() {
    264264                $dynamic_block_names = get_dynamic_block_names();
    class REST_Block_Renderer_Controller_Test extends WP_Test_REST_Controller_Testca 
    273273         *
    274274         * @ticket 45098
    275275         *
    276          * @covers WP_REST_Block_Renderer_Controller::get_item()
     276         * @covers WP_REST_Block_Renderer_Controller::get_item
    277277         */
    278278        public function test_get_item_without_permissions() {
    279279                wp_set_current_user( 0 );
    class REST_Block_Renderer_Controller_Test extends WP_Test_REST_Controller_Testca 
    305305         *
    306306         * @ticket 45098
    307307         *
    308          * @covers WP_REST_Block_Renderer_Controller::get_item()
     308         * @covers WP_REST_Block_Renderer_Controller::get_item
    309309         */
    310310        public function test_get_item_invalid_block_name() {
    311311                wp_set_current_user( self::$user_id );
    class REST_Block_Renderer_Controller_Test extends WP_Test_REST_Controller_Testca 
    322322         *
    323323         * @ticket 45098
    324324         *
    325          * @covers WP_REST_Block_Renderer_Controller::get_item()
     325         * @covers WP_REST_Block_Renderer_Controller::get_item
    326326         */
    327327        public function test_get_item_invalid_attribute() {
    328328                wp_set_current_user( self::$user_id );
    class REST_Block_Renderer_Controller_Test extends WP_Test_REST_Controller_Testca 
    343343         *
    344344         * @ticket 45098
    345345         *
    346          * @covers WP_REST_Block_Renderer_Controller::get_item()
     346         * @covers WP_REST_Block_Renderer_Controller::get_item
    347347         */
    348348        public function test_get_item_unrecognized_attribute() {
    349349                wp_set_current_user( self::$user_id );
    class REST_Block_Renderer_Controller_Test extends WP_Test_REST_Controller_Testca 
    364364         *
    365365         * @ticket 45098
    366366         *
    367          * @covers WP_REST_Block_Renderer_Controller::get_item()
     367         * @covers WP_REST_Block_Renderer_Controller::get_item
    368368         */
    369369        public function test_get_item_default_attributes() {
    370370                wp_set_current_user( self::$user_id );
    class REST_Block_Renderer_Controller_Test extends WP_Test_REST_Controller_Testca 
    396396         *
    397397         * @ticket 45098
    398398         *
    399          * @covers WP_REST_Block_Renderer_Controller::get_item()
     399         * @covers WP_REST_Block_Renderer_Controller::get_item
    400400         */
    401401        public function test_get_item() {
    402402                wp_set_current_user( self::$user_id );
    class REST_Block_Renderer_Controller_Test extends WP_Test_REST_Controller_Testca 
    589589         *
    590590         * @ticket 45098
    591591         *
    592          * @covers WP_REST_Block_Renderer_Controller::get_item_schema()
     592         * @covers WP_REST_Block_Renderer_Controller::get_item_schema
    593593         */
    594594        public function test_get_item_schema() {
    595595                $request  = new WP_REST_Request( 'OPTIONS', self::$rest_api_route . self::$block_name );
  • tests/phpunit/tests/rest-api/rest-posts-controller.php

    diff --git a/tests/phpunit/tests/rest-api/rest-posts-controller.php b/tests/phpunit/tests/rest-api/rest-posts-controller.php
    index 3c6c668ff0..7bec6cc516 100644
    a b class WP_Test_REST_Posts_Controller extends WP_Test_REST_Post_Type_Controller_Te 
    35373537        /**
    35383538         * Test update_item() with same template that no longer exists.
    35393539         *
    3540          * @covers WP_REST_Posts_Controller::check_template()
     3540         * @covers WP_REST_Posts_Controller::check_template
    35413541         * @ticket 39996
    35423542         */
    35433543        public function test_update_item_with_same_template_that_no_longer_exists() {
  • tests/phpunit/tests/theme.php

    diff --git a/tests/phpunit/tests/theme.php b/tests/phpunit/tests/theme.php
    index 3e59c0fa06..b0b0d1b55c 100644
    a b class Tests_Theme extends WP_UnitTestCase { 
    352352        /**
    353353         * Test _wp_keep_alive_customize_changeset_dependent_auto_drafts.
    354354         *
    355          * @covers ::_wp_keep_alive_customize_changeset_dependent_auto_drafts()
     355         * @covers ::_wp_keep_alive_customize_changeset_dependent_auto_drafts
    356356         */
    357357        function test_wp_keep_alive_customize_changeset_dependent_auto_drafts() {
    358358                $nav_created_post_ids = $this->factory()->post->create_many(
  • tests/phpunit/tests/widgets.php

    diff --git a/tests/phpunit/tests/widgets.php b/tests/phpunit/tests/widgets.php
    index bc63a81d87..0ccd86e699 100644
    a b class Tests_Widgets extends WP_UnitTestCase { 
    740740        /**
    741741         * Tests for when 'sidebars_widgets' theme mod is populated.
    742742         *
    743          * @covers ::retrieve_widgets()
     743         * @covers ::retrieve_widgets
    744744         */
    745745        function test_retrieve_widgets_with_theme_mod() {
    746746                global $sidebars_widgets, $_wp_sidebars_widgets;
    class Tests_Widgets extends WP_UnitTestCase { 
    804804        /**
    805805         * Tests for when sidebars widgets matches registered sidebars.
    806806         *
    807          * @covers ::retrieve_widgets()
     807         * @covers ::retrieve_widgets
    808808         */
    809809        function test_retrieve_widgets_with_sidebars_widgets_matching_registered_sidebars() {
    810810                global $sidebars_widgets;
    class Tests_Widgets extends WP_UnitTestCase { 
    842842        /**
    843843         * Tests for when sidebars widgets doesn't match registered sidebars.
    844844         *
    845          * @covers ::retrieve_widgets()
     845         * @covers ::retrieve_widgets
    846846         */
    847847        function test_retrieve_widgets_with_sidebars_widgets_not_matching_registered_sidebars() {
    848848                global $sidebars_widgets, $_wp_sidebars_widgets;
    class Tests_Widgets extends WP_UnitTestCase { 
    936936        /**
    937937         * Tests for Customizer mode.
    938938         *
    939          * @covers ::retrieve_widgets()
     939         * @covers ::retrieve_widgets
    940940         */
    941941        function test_retrieve_widgets_for_customizer() {
    942942                global $sidebars_widgets, $_wp_sidebars_widgets;
    class Tests_Widgets extends WP_UnitTestCase { 
    10081008        /**
    10091009         * Tests for orphaned widgets being moved into inactive widgets.
    10101010         *
    1011          * @covers ::retrieve_widgets()
     1011         * @covers ::retrieve_widgets
    10121012         */
    10131013        function test_retrieve_widgets_move_orphaned_widgets_to_inactive() {
    10141014                global $sidebars_widgets;
    class Tests_Widgets extends WP_UnitTestCase { 
    10431043        /**
    10441044         * Test _wp_remove_unregistered_widgets.
    10451045         *
    1046          * @covers ::_wp_remove_unregistered_widgets()
     1046         * @covers ::_wp_remove_unregistered_widgets
    10471047         */
    10481048        public function test__wp_remove_unregistered_widgets() {
    10491049                $widgets = array(
    class Tests_Widgets extends WP_UnitTestCase { 
    10731073        /**
    10741074         * Two themes with one sidebar each should just map, switching to a theme not previously-active.
    10751075         *
    1076          * @covers ::wp_map_sidebars_widgets()
     1076         * @covers ::wp_map_sidebars_widgets
    10771077         */
    10781078        public function test_one_sidebar_each() {
    10791079                $this->register_sidebars( array( 'primary' ) );
    class Tests_Widgets extends WP_UnitTestCase { 
    10931093        /**
    10941094         * Sidebars with the same name should map, switching to a theme not previously-active.
    10951095         *
    1096          * @covers ::wp_map_sidebars_widgets()
     1096         * @covers ::wp_map_sidebars_widgets
    10971097         */
    10981098        public function test_sidebars_with_same_slug() {
    10991099                $this->register_sidebars( array( 'primary', 'secondary' ) );
    class Tests_Widgets extends WP_UnitTestCase { 
    11111111        /**
    11121112         * Make educated guesses on theme sidebars.
    11131113         *
    1114          * @covers ::wp_map_sidebars_widgets()
     1114         * @covers ::wp_map_sidebars_widgets
    11151115         */
    11161116        public function test_sidebar_guessing() {
    11171117                $this->register_sidebars( array( 'primary', 'secondary' ) );
    class Tests_Widgets extends WP_UnitTestCase { 
    11341134        /**
    11351135         * Make sure two sidebars that fall in the same group don't get the same menu assigned.
    11361136         *
    1137          * @covers ::wp_map_sidebars_widgets()
     1137         * @covers ::wp_map_sidebars_widgets
    11381138         */
    11391139        public function test_sidebar_guessing_one_menu_per_group() {
    11401140                $this->register_sidebars( array( 'primary' ) );
    class Tests_Widgets extends WP_UnitTestCase { 
    11551155        /**
    11561156         * Make sure two sidebars that fall in the same group get menus assigned from the same group.
    11571157         *
    1158          * @covers ::wp_map_sidebars_widgets()
     1158         * @covers ::wp_map_sidebars_widgets
    11591159         */
    11601160        public function test_sidebar_guessing_one_menu_per_sidebar() {
    11611161                $this->register_sidebars( array( 'primary', 'main' ) );
  • tests/phpunit/tests/widgets/media-audio-widget.php

    diff --git a/tests/phpunit/tests/widgets/media-audio-widget.php b/tests/phpunit/tests/widgets/media-audio-widget.php
    index aceba85711..c3e467094e 100644
    a b class Test_WP_Widget_Media_Audio extends WP_UnitTestCase { 
    8585        /**
    8686         * Test constructor.
    8787         *
    88          * @covers WP_Widget_Media_Audio::__construct()
     88         * @covers WP_Widget_Media_Audio::__construct
    8989         */
    9090        function test_constructor() {
    9191                $widget = new WP_Widget_Media_Audio();
  • tests/phpunit/tests/widgets/media-gallery-widget.php

    diff --git a/tests/phpunit/tests/widgets/media-gallery-widget.php b/tests/phpunit/tests/widgets/media-gallery-widget.php
    index 509504f3d8..a855e643a2 100644
    a b class Test_WP_Widget_Media_Gallery extends WP_UnitTestCase { 
    2929        /**
    3030         * Test get_instance_schema method.
    3131         *
    32          * @covers WP_Widget_Media_Gallery::get_instance_schema()
     32         * @covers WP_Widget_Media_Gallery::get_instance_schema
    3333         */
    3434        public function test_get_instance_schema() {
    3535                $widget = new WP_Widget_Media_Gallery();
    class Test_WP_Widget_Media_Gallery extends WP_UnitTestCase { 
    5151        /**
    5252         * Test update() method.
    5353         *
    54          * @covers WP_Widget_Media_Gallery::render_media()
     54         * @covers WP_Widget_Media_Gallery::render_media
    5555         */
    5656        public function test_render_media() {
    5757                $widget = new WP_Widget_Media_Gallery();
    class Test_WP_Widget_Media_Gallery extends WP_UnitTestCase { 
    8989        /**
    9090         * Test enqueue_admin_scripts() method.
    9191         *
    92          * @covers WP_Widget_Media_Gallery::enqueue_admin_scripts()
     92         * @covers WP_Widget_Media_Gallery::enqueue_admin_scripts
    9393         */
    9494        public function test_enqueue_admin_scripts() {
    9595                set_current_screen( 'widgets.php' );
    class Test_WP_Widget_Media_Gallery extends WP_UnitTestCase { 
    108108        /**
    109109         * Test update() method.
    110110         *
    111          * @covers WP_Widget_Media_Gallery::update()
     111         * @covers WP_Widget_Media_Gallery::update
    112112         */
    113113        public function test_update() {
    114114                $widget   = new WP_Widget_Media_Gallery();
    class Test_WP_Widget_Media_Gallery extends WP_UnitTestCase { 
    189189        /**
    190190         * Test render_control_template_scripts() method.
    191191         *
    192          * @covers WP_Widget_Media_Gallery::render_control_template_scripts()
     192         * @covers WP_Widget_Media_Gallery::render_control_template_scripts
    193193         */
    194194        public function test_render_control_template_scripts() {
    195195                $widget = new WP_Widget_Media_Gallery();
  • tests/phpunit/tests/widgets/media-image-widget.php

    diff --git a/tests/phpunit/tests/widgets/media-image-widget.php b/tests/phpunit/tests/widgets/media-image-widget.php
    index 69006000b5..8367e79898 100644
    a b class Test_WP_Widget_Media_Image extends WP_UnitTestCase { 
    9292        /**
    9393         * Test constructor.
    9494         *
    95          * @covers WP_Widget_Media_Image::__construct()
     95         * @covers WP_Widget_Media_Image::__construct
    9696         */
    9797        function test_constructor() {
    9898                $widget = new WP_Widget_Media_Image();
  • tests/phpunit/tests/widgets/media-video-widget.php

    diff --git a/tests/phpunit/tests/widgets/media-video-widget.php b/tests/phpunit/tests/widgets/media-video-widget.php
    index fa37e44c7b..296bb92965 100644
    a b class Test_WP_Widget_Media_Video extends WP_UnitTestCase { 
    2929        /**
    3030         * Test get_instance_schema method.
    3131         *
    32          * @covers WP_Widget_Media_Video::get_instance_schema()
     32         * @covers WP_Widget_Media_Video::get_instance_schema
    3333         */
    3434        function test_get_instance_schema() {
    3535                $widget = new WP_Widget_Media_Video();
    class Test_WP_Widget_Media_Video extends WP_UnitTestCase { 
    8686        /**
    8787         * Test constructor.
    8888         *
    89          * @covers WP_Widget_Media_Video::__construct()
     89         * @covers WP_Widget_Media_Video::__construct
    9090         */
    9191        function test_constructor() {
    9292                $widget = new WP_Widget_Media_Video();
    class Test_WP_Widget_Media_Video extends WP_UnitTestCase { 
    115115        /**
    116116         * Test get_instance_schema method.
    117117         *
    118          * @covers WP_Widget_Media_Video::update()
     118         * @covers WP_Widget_Media_Video::update
    119119         */
    120120        function test_update() {
    121121                $widget   = new WP_Widget_Media_Video();
    class Test_WP_Widget_Media_Video extends WP_UnitTestCase { 
    215215        /**
    216216         * Test render_media method.
    217217         *
    218          * @covers WP_Widget_Media_Video::render_media()
    219          * @covers WP_Widget_Media_Video::inject_video_max_width_style()
     218         * @covers WP_Widget_Media_Video::render_media
     219         * @covers WP_Widget_Media_Video::inject_video_max_width_style
    220220         */
    221221        function test_render_media() {
    222222                $test_movie_file = __FILE__ . '../../data/uploads/small-video.m4v';
    class Test_WP_Widget_Media_Video extends WP_UnitTestCase { 
    303303         *
    304304         * @global WP_Scripts $wp_scripts
    305305         * @global WP_Styles $wp_styles
    306          * @covers WP_Widget_Media_Video::enqueue_preview_scripts()
     306         * @covers WP_Widget_Media_Video::enqueue_preview_scripts
    307307         */
    308308        function test_enqueue_preview_scripts() {
    309309                global $wp_scripts, $wp_styles;
    class Test_WP_Widget_Media_Video extends WP_UnitTestCase { 
    328328        /**
    329329         * Test enqueue_admin_scripts method.
    330330         *
    331          * @covers WP_Widget_Media_Video::enqueue_admin_scripts()
     331         * @covers WP_Widget_Media_Video::enqueue_admin_scripts
    332332         */
    333333        function test_enqueue_admin_scripts() {
    334334                set_current_screen( 'widgets.php' );
    class Test_WP_Widget_Media_Video extends WP_UnitTestCase { 
    341341        /**
    342342         * Test render_control_template_scripts method.
    343343         *
    344          * @covers WP_Widget_Media_Video::render_control_template_scripts()
     344         * @covers WP_Widget_Media_Video::render_control_template_scripts
    345345         */
    346346        function test_render_control_template_scripts() {
    347347                $widget = new WP_Widget_Media_Video();
  • tests/phpunit/tests/widgets/media-widget.php

    diff --git a/tests/phpunit/tests/widgets/media-widget.php b/tests/phpunit/tests/widgets/media-widget.php
    index 27a4d5af60..95c34ab5ae 100644
    a b class Test_WP_Widget_Media extends WP_UnitTestCase { 
    5050        /**
    5151         * Test constructor.
    5252         *
    53          * @covers WP_Widget_Media::__construct()
    54          * @covers WP_Widget_Media::_register()
     53         * @covers WP_Widget_Media::__construct
     54         * @covers WP_Widget_Media::_register
    5555         */
    5656        function test_constructor() {
    5757                $widget = $this->get_mocked_class_instance();
    class Test_WP_Widget_Media extends WP_UnitTestCase { 
    106106         * Test constructor in customize preview.
    107107         *
    108108         * @global WP_Customize_Manager $wp_customize
    109          * @covers WP_Widget_Media::__construct()
    110          * @covers WP_Widget_Media::_register()
     109         * @covers WP_Widget_Media::__construct
     110         * @covers WP_Widget_Media::_register
    111111         */
    112112        function test_constructor_in_customize_preview() {
    113113                global $wp_customize;
    class Test_WP_Widget_Media extends WP_UnitTestCase { 
    228228        /**
    229229         * Test update method.
    230230         *
    231          * @covers WP_Widget_Media::update()
     231         * @covers WP_Widget_Media::update
    232232         */
    233233        function test_update() {
    234234                $widget   = $this->get_mocked_class_instance();
    class Test_WP_Widget_Media extends WP_UnitTestCase { 
    314314        /**
    315315         * Test widget method.
    316316         *
    317          * @covers WP_Widget_Media::widget()
    318          * @covers WP_Widget_Media::render_media()
     317         * @covers WP_Widget_Media::widget
     318         * @covers WP_Widget_Media::render_media
    319319         */
    320320        function test_widget() {
    321321                $args     = array(
    class Test_WP_Widget_Media extends WP_UnitTestCase { 
    389389        /**
    390390         * Test form method.
    391391         *
    392          * @covers WP_Widget_Media::form()
     392         * @covers WP_Widget_Media::form
    393393         */
    394394        function test_form() {
    395395                $widget = $this->get_mocked_class_instance();
    class Test_WP_Widget_Media extends WP_UnitTestCase { 
    406406        /**
    407407         * Test display_media_state method.
    408408         *
    409          * @covers WP_Widget_Media::display_media_state()
     409         * @covers WP_Widget_Media::display_media_state
    410410         */
    411411        function test_display_media_state() {
    412412                $widget        = $this->get_mocked_class_instance();
    class Test_WP_Widget_Media extends WP_UnitTestCase { 
    448448        /**
    449449         * Test enqueue_admin_scripts method.
    450450         *
    451          * @covers WP_Widget_Media::enqueue_admin_scripts()
     451         * @covers WP_Widget_Media::enqueue_admin_scripts
    452452         */
    453453        function test_enqueue_admin_scripts() {
    454454                set_current_screen( 'widgets.php' );
    class Test_WP_Widget_Media extends WP_UnitTestCase { 
    476476        /**
    477477         * Test has_content method.
    478478         *
    479          * @covers WP_Widget_Media::has_content()
     479         * @covers WP_Widget_Media::has_content
    480480         */
    481481        function test_has_content() {
    482482                $attachment_id = self::factory()->attachment->create_object(
  • tests/phpunit/tests/widgets/text-widget.php

    diff --git a/tests/phpunit/tests/widgets/text-widget.php b/tests/phpunit/tests/widgets/text-widget.php
    index f4d4c58a4e..caa25e0eb8 100644
    a b class Test_WP_Widget_Text extends WP_UnitTestCase { 
    7575         * Test register in customize preview.
    7676         *
    7777         * @global WP_Customize_Manager $wp_customize
    78          * @covers WP_Widget_Text::__construct()
    79          * @covers WP_Widget_Text::_register()
     78         * @covers WP_Widget_Text::__construct
     79         * @covers WP_Widget_Text::_register
    8080         */
    8181        function test__register_in_customize_preview() {
    8282                global $wp_customize;