Make WordPress Core

Changeset 51702 for trunk


Ignore:
Timestamp:
08/31/2021 05:22:32 PM (5 years ago)
Author:
hellofromTonya
Message:

Tests: Add missing @covers tags for actions' tests.

Props pbearne, hudson-atwell, jrf, hellofromTonya.
See #39265.

Location:
trunk/tests/phpunit/tests
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/actions.php

    r51403 r51702  
    88class Tests_Actions extends WP_UnitTestCase {
    99
     10        /**
     11         * @covers ::do_action
     12         */
    1013        function test_simple_action() {
    1114                $a   = new MockAction();
     
    2528        }
    2629
     30        /**
     31         * @covers ::remove_action
     32         */
    2733        function test_remove_action() {
    2834                $a   = new MockAction();
     
    4450        }
    4551
     52        /**
     53         * @covers ::has_action
     54         */
    4655        function test_has_action() {
    4756                $tag  = __FUNCTION__;
     
    5867        }
    5968
    60         // One tag with multiple actions.
     69        /**
     70         * One tag with multiple actions.
     71         *
     72         * @covers ::do_action
     73         */
    6174        function test_multiple_actions() {
    6275                $a1  = new MockAction();
     
    7588        }
    7689
     90        /**
     91         * One tag with multiple actions.
     92         *
     93         * @covers ::do_action
     94         */
    7795        function test_action_args_1() {
    7896                $a   = new MockAction();
     
    90108        }
    91109
     110        /**
     111         * One tag with multiple actions.
     112         *
     113         * @covers ::do_action
     114         */
    92115        function test_action_args_2() {
    93116                $a1   = new MockAction();
     
    121144         * @see https://core.trac.wordpress.org/ticket/17817#comment:72
    122145         * @ticket 17817
     146         *
     147         * @covers ::do_action
    123148         */
    124149        function test_action_args_3() {
     
    158183         *
    159184         * @ticket 48312
     185         *
     186         * @covers ::do_action
    160187         */
    161188        function test_action_args_with_php4_syntax() {
     
    202229        }
    203230
     231        /**
     232         * @covers ::did_action
     233         */
    204234        function test_did_action() {
    205235                $tag1 = 'action1';
     
    223253        }
    224254
     255        /**
     256         * @covers ::do_action
     257         */
    225258        function test_all_action() {
    226259                $a    = new MockAction();
     
    247280        }
    248281
     282        /**
     283         * @covers ::remove_action
     284         */
    249285        function test_remove_all_action() {
    250286                $a   = new MockAction();
     
    267303        }
    268304
     305        /**
     306         * @covers ::do_action_ref_array
     307         */
    269308        function test_action_ref_array() {
    270309                $obj = new stdClass();
     
    285324        /**
    286325         * @ticket 11241
     326         *
     327         * @covers ::do_action
    287328         */
    288329        function test_action_keyed_array() {
     
    310351        }
    311352
     353        /**
     354         * @covers ::remove_action
     355         */
    312356        function test_action_self_removal() {
    313357                add_action( 'test_action_self_removal', array( $this, 'action_self_removal' ) );
     
    322366        /**
    323367         * @ticket 17817
     368         *
     369         * @covers ::do_action
    324370         */
    325371        function test_action_recursion() {
     
    337383        }
    338384
     385        /**
     386         * @covers ::do_action
     387         */
    339388        function action_that_causes_recursion( $tag ) {
    340389                static $recursing = false;
     
    349398         * @ticket 9968
    350399         * @ticket 17817
     400         *
     401         * @covers ::remove_action
     402         * @covers ::add_action
    351403         */
    352404        function test_action_callback_manipulation_while_running() {
     
    384436         * This specificaly addresses the concern raised at
    385437         * https://core.trac.wordpress.org/ticket/17817#comment:52
     438         *
     439         * @covers ::remove_filter
    386440         */
    387441        function test_remove_anonymous_callback() {
     
    417471         *
    418472         * @ticket 17817
     473         *
     474         * @covers WP_Hook::offsetGet
     475         * @covers WP_Hook::offsetSet
     476         * @covers WP_Hook::offsetUnset
    419477         */
    420478        function test_array_access_of_wp_filter_global() {
     
    443501         *
    444502         * @ticket 14994
     503         *
     504         * @covers ::current_action
    445505         */
    446506        function test_current_action() {
     
    454514        /**
    455515         * @ticket 14994
     516         *
     517         * @covers ::doing_filter
    456518         */
    457519        function test_doing_filter() {
     
    473535        /**
    474536         * @ticket 14994
     537         *
     538         * @covers ::doing_filter
    475539         */
    476540        function test_doing_action() {
     
    492556        /**
    493557         * @ticket 14994
     558         *
     559         * @covers ::doing_filter
    494560         */
    495561        function test_doing_filter_real() {
     
    542608         * @ticket 10441
    543609         * @expectedDeprecated tests_do_action_deprecated
     610         *
     611         * @covers ::do_action_deprecated
    544612         */
    545613        public function test_do_action_deprecated() {
     
    560628         * @ticket 10441
    561629         * @expectedDeprecated tests_do_action_deprecated
     630         *
     631         * @covers ::do_action_deprecated
    562632         */
    563633        public function test_do_action_deprecated_with_multiple_params() {
  • trunk/tests/phpunit/tests/actions/callbacks.php

    r48937 r51702  
    88        /**
    99         * @ticket 23265
     10         *
     11         * @covers ::add_action
    1012         */
    1113        function test_callback_representations() {
  • trunk/tests/phpunit/tests/actions/closures.php

    r51657 r51702  
    1010        /**
    1111         * @ticket 10493
     12         *
     13         * @covers ::add_action
     14         * @covers ::has_action
     15         * @covers ::do_action
    1216         */
    1317        function test_action_closure() {
Note: See TracChangeset for help on using the changeset viewer.