Make WordPress Core

Changeset 53687


Ignore:
Timestamp:
07/08/2022 12:11:15 AM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Remove @uses tags from the test suite.

  • These were not used consistently, with only four instances across all the tests.
  • Using this tag in combination with the beStrictAboutCoversAnnotation="true" setting will mark a test as "Risky" if code is executed during the test which is not annotated via @covers or @uses tags. That would make the maintainance of the tags very fiddly, while adding little additional value for the test code base.

Follow-up to [32995], [39914], [42636], [53682].

Props jrf.
See #39265.

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

Legend:

Unmodified
Added
Removed
  • trunk/tests/phpunit/tests/formatting/wpAutop.php

    r53562 r53687  
    545545         *
    546546         * @ticket 39307
    547          *
    548          * @uses ::trim
    549547         */
    550548        public function test_that_wpautop_does_not_add_extra_closing_p_in_figure() {
  • trunk/tests/phpunit/tests/term/wpGenerateTagCloud.php

    r52010 r53687  
    296296         * Helper method retrieve the created terms.
    297297         *
    298          * @uses get_terms
    299          *
    300298         * @param array $get_terms_args Options passed to get_terms()
    301299         *
  • trunk/tests/phpunit/tests/url.php

    r53682 r53687  
    213213        /**
    214214         * @covers ::home_url
    215          *
    216          * @uses ::get_option
    217215         */
    218216        public function test_home_url_from_admin() {
  • trunk/tests/phpunit/tests/url/getPrivacyPolicyUrl.php

    r53682 r53687  
    5858        /**
    5959         * The function should return the privacy policy URL when `wp_page_for_privacy_policy` is set.
    60          *
    61          * @uses ::get_permalink
    6260         */
    6361        public function test_get_privacy_policy_url_should_return_valid_url_when_policy_page_set() {
Note: See TracChangeset for help on using the changeset viewer.