Make WordPress Core


Ignore:
Timestamp:
10/31/2022 01:54:00 PM (4 years ago)
Author:
SergeyBiryukov
Message:

Tests: Move some @covers tags in the formatting group to the class DocBlock.

This aims to bring more consistency, as these test classes typically cover a single function, unless noted otherwise.

Follow-up to [53562], [53571], [54051].

See #56793.

File:
1 edited

Legend:

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

    r53574 r54728  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::esc_url
    57 */
    68class Tests_Formatting_EscUrl extends WP_UnitTestCase {
     
    810        /**
    911         * @ticket 23605
    10          *
    11          * @covers ::esc_url
    1212         */
    1313        public function test_spaces() {
     
    2222        }
    2323
    24         /**
    25          * @covers ::esc_url
    26          */
    2724        public function test_bad_characters() {
    2825                $this->assertSame( 'http://example.com/watchthelinefeedgo', esc_url( 'http://example.com/watchthelinefeed%0Ago' ) );
     
    3936        }
    4037
    41         /**
    42          * @covers ::esc_url
    43          */
    4438        public function test_relative() {
    4539                $this->assertSame( '/example.php', esc_url( '/example.php' ) );
     
    5044
    5145        /**
    52          * @covers ::esc_url
    5346         * @covers ::sanitize_url
    5447         */
     
    7366        }
    7467
    75         /**
    76          * @covers ::esc_url
    77          */
    7868        public function test_bare() {
    7969                $this->assertSame( 'http://example.com?foo', esc_url( 'example.com?foo' ) );
     
    8575
    8676        /**
    87          * @covers ::esc_url
    8877         * @covers ::sanitize_url
    8978         */
     
    10291
    10392        /**
    104          * @covers ::esc_url
    10593         * @covers ::wp_allowed_protocols
    10694         */
     
    169157        /**
    170158         * @ticket 23187
    171          *
    172          * @covers ::esc_url
    173159         */
    174160        public function test_protocol_case() {
     
    177163        }
    178164
    179         /**
    180          * @covers ::esc_url
    181          */
    182165        public function test_display_extras() {
    183166                $this->assertSame( 'http://example.com/'quoted'', esc_url( 'http://example.com/\'quoted\'' ) );
     
    185168        }
    186169
    187         /**
    188          * @covers ::esc_url
    189          */
    190170        public function test_non_ascii() {
    191171                $this->assertSame( 'http://example.org/баба', esc_url( 'http://example.org/баба' ) );
     
    194174        }
    195175
    196         /**
    197          * @covers ::esc_url
    198          */
    199176        public function test_feed() {
    200177                $this->assertSame( '', esc_url( 'feed:javascript:alert(1)' ) );
     
    207184        /**
    208185         * @ticket 16859
    209          *
    210          * @covers ::esc_url
    211186         */
    212187        public function test_square_brackets() {
     
    234209        /**
    235210         * @ticket 21974
    236          *
    237          * @covers ::esc_url
    238211         */
    239212        public function test_protocol_relative_with_colon() {
     
    243216        /**
    244217         * @ticket 31632
    245          *
    246          * @covers ::esc_url
    247218         */
    248219        public function test_mailto_with_newline() {
     
    260231        /**
    261232         * @ticket 31632
    262          *
    263          * @covers ::esc_url
    264233         */
    265234        public function test_mailto_in_http_url_with_newline() {
     
    277246        /**
    278247         * @ticket 23605
    279          *
    280          * @covers ::esc_url
    281248         */
    282249        public function test_mailto_with_spaces() {
     
    299266        /**
    300267         * @ticket 34202
    301          *
    302          * @covers ::esc_url
    303268         */
    304269        public function test_ipv6_hosts() {
Note: See TracChangeset for help on using the changeset viewer.