Make WordPress Core

Changeset 54728 for trunk


Ignore:
Timestamp:
10/31/2022 01:54:00 PM (2 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.

Location:
trunk/tests/phpunit/tests/formatting
Files:
9 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() {
  • trunk/tests/phpunit/tests/formatting/excerptRemoveBlocks.php

    r54088 r54728  
    44 * @group formatting
    55 * @ticket 46133
     6 *
     7 * @covers ::excerpt_remove_blocks
    68 */
    79class Tests_Formatting_ExcerptRemoveBlocks extends WP_UnitTestCase {
     
    9193     *
    9294     * @ticket 46133
    93      *
    94      * @covers ::excerpt_remove_blocks
    9595     */
    9696    public function test_excerpt_remove_blocks() {
  • trunk/tests/phpunit/tests/formatting/getBloginfo.php

    r53562 r54728  
    3838    /**
    3939     * @ticket 27942
     40     *
    4041     * @covers ::sanitize_option
    4142     */
  • trunk/tests/phpunit/tests/formatting/sanitizeKey.php

    r52370 r54728  
    33/**
    44 * @group formatting
     5 *
    56 * @covers ::sanitize_key
    67 */
  • trunk/tests/phpunit/tests/formatting/sanitizePost.php

    r53562 r54728  
    44 * @group post
    55 *
     6 * @covers ::sanitize_post
    67 * @covers WP_Post::__construct
    78 */
  • trunk/tests/phpunit/tests/formatting/wpBasename.php

    r53562 r54728  
    33/**
    44 * @group formatting
    5 
     5 *
    66 * @covers ::wp_basename
    77 */
  • trunk/tests/phpunit/tests/formatting/wpHtmlSplit.php

    r54051 r54728  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_html_split
    57 */
    68class Tests_Formatting_wpHtmlSplit extends WP_UnitTestCase {
     
    1012     *
    1113     * @dataProvider data_basic_features
    12      *
    13      * @covers ::wp_html_split
    1414     */
    1515    public function test_basic_features( $input, $output ) {
  • trunk/tests/phpunit/tests/formatting/wpParseStr.php

    r51624 r54728  
    33/**
    44 * @group formatting
     5 *
    56 * @covers ::wp_parse_str
    67 */
  • trunk/tests/phpunit/tests/formatting/wpTexturize.php

    r54051 r54728  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wptexturize
    57 */
    68class Tests_Formatting_wpTexturize extends WP_UnitTestCase {
    79
    8     /**
    9      * @covers ::wptexturize
    10      */
    1110    public function test_dashes() {
    1211        $this->assertSame( 'Hey — boo?', wptexturize( 'Hey -- boo?' ) );
     
    1413    }
    1514
    16     /**
    17      * @covers ::wptexturize
    18      */
    1915    public function test_disable() {
    2016        $this->assertSame( '<pre>---&</pre>', wptexturize( '<pre>---&</pre>' ) );
     
    4238    /**
    4339     * @ticket 1418
    44      *
    45      * @covers ::wptexturize
    4640     */
    4741    public function test_bracketed_quotes_1418() {
     
    5347    /**
    5448     * @ticket 3810
    55      *
    56      * @covers ::wptexturize
    5749     */
    5850    public function test_bracketed_quotes_3810() {
     
    6254    /**
    6355     * @ticket 4539
    64      *
    65      * @covers ::wptexturize
    6656     */
    6757    public function test_basic_quotes() {
     
    8777     * @ticket 4539
    8878     * @ticket 15241
    89      *
    90      * @covers ::wptexturize
    9179     */
    9280    public function test_full_sentences_with_unmatched_single_quotes() {
     
    9987    /**
    10088     * @ticket 4539
    101      *
    102      * @covers ::wptexturize
    10389     */
    10490    public function test_quotes() {
     
    120106    /**
    121107     * @ticket 4539
    122      *
    123      * @covers ::wptexturize
    124108     */
    125109    public function test_quotes_before_s() {
     
    133117    /**
    134118     * @ticket 4539
    135      *
    136      * @covers ::wptexturize
    137119     */
    138120    public function test_quotes_before_numbers() {
     
    163145    }
    164146
    165     /**
    166      * @covers ::wptexturize
    167      */
    168147    public function test_quotes_after_numbers() {
    169148        $this->assertSame( 'Class of &#8217;99', wptexturize( "Class of '99" ) );
     
    173152     * @ticket 4539
    174153     * @ticket 15241
    175      *
    176      * @covers ::wptexturize
    177154     */
    178155    public function test_other_html() {
     
    182159    }
    183160
    184     /**
    185      * @covers ::wptexturize
    186      */
    187161    public function test_x() {
    188162        $this->assertSame( '14&#215;24', wptexturize( '14x24' ) );
    189163    }
    190164
    191     /**
    192      * @covers ::wptexturize
    193      */
    194165    public function test_minutes_seconds() {
    195166        $this->assertSame( '9&#8242;', wptexturize( '9\'' ) );
     
    205176    /**
    206177     * @ticket 8775
    207      *
    208      * @covers ::wptexturize
    209178     */
    210179    public function test_wptexturize_quotes_around_numbers() {
     
    217186    /**
    218187     * @ticket 8912
    219      *
    220      * @covers ::wptexturize
    221188     */
    222189    public function test_wptexturize_html_comments() {
     
    229196     * @ticket 4539
    230197     * @ticket 15241
    231      *
    232      * @covers ::wptexturize
    233198     */
    234199    public function test_entity_quote_cuddling() {
     
    239204    /**
    240205     * @ticket 22823
    241      *
    242      * @covers ::wptexturize
    243206     */
    244207    public function test_apostrophes_before_primes() {
     
    248211    /**
    249212     * @ticket 23185
    250      *
    251      * @covers ::wptexturize
    252213     */
    253214    public function test_spaces_around_hyphens() {
     
    273234    /**
    274235     * @ticket 31030
    275      *
    276      * @covers ::wptexturize
    277236     */
    278237    public function test_hyphens_at_start_and_end() {
     
    292251     *
    293252     * @ticket 22692
    294      *
    295      * @covers ::wptexturize
    296253     */
    297254    public function test_spaces_around_quotes_never() {
     
    311268     * @ticket 22692
    312269     * @dataProvider data_spaces_around_quotes
    313      *
    314      * @covers ::wptexturize
    315270     */
    316271    public function test_spaces_around_quotes( $input, $output ) {
     
    369324     * @ticket 22692
    370325     * @dataProvider data_apos_before_digits
    371      *
    372      * @covers ::wptexturize
    373326     */
    374327    public function test_apos_before_digits( $input, $output ) {
     
    412365     * @ticket 22692
    413366     * @dataProvider data_opening_single_quote
    414      *
    415      * @covers ::wptexturize
    416367     */
    417368    public function test_opening_single_quote( $input, $output ) {
     
    543494     * @ticket 22692
    544495     * @dataProvider data_double_prime
    545      *
    546      * @covers ::wptexturize
    547496     */
    548497    public function test_double_prime( $input, $output ) {
     
    578527     * @ticket 22692
    579528     * @dataProvider data_single_prime
    580      *
    581      * @covers ::wptexturize
    582529     */
    583530    public function test_single_prime( $input, $output ) {
     
    613560     * @ticket 22692
    614561     * @dataProvider data_contractions
    615      *
    616      * @covers ::wptexturize
    617562     */
    618563    public function test_contractions( $input, $output ) {
     
    656601     * @ticket 22692
    657602     * @dataProvider data_opening_quote
    658      *
    659      * @covers ::wptexturize
    660603     */
    661604    public function test_opening_quote( $input, $output ) {
     
    735678     * @ticket 22692
    736679     * @dataProvider data_closing_quote
    737      *
    738      * @covers ::wptexturize
    739680     */
    740681    public function test_closing_quote( $input, $output ) {
     
    826767     * @ticket 22692
    827768     * @dataProvider data_closing_single_quote
    828      *
    829      * @covers ::wptexturize
    830769     */
    831770    public function test_closing_single_quote( $input, $output ) {
     
    918857     * @ticket 30445
    919858     * @dataProvider data_multiplication
    920      *
    921      * @covers ::wptexturize
    922859     */
    923860    public function test_multiplication( $input, $output ) {
     
    970907     * @ticket 22692
    971908     * @dataProvider data_ampersand
    972      *
    973      * @covers ::wptexturize
    974909     */
    975910    public function test_ampersand( $input, $output ) {
     
    1037972     * @ticket 22692
    1038973     * @dataProvider data_cockney
    1039      *
    1040      * @covers ::wptexturize
    1041974     */
    1042975    public function test_cockney( $input, $output ) {
     
    11001033     * @ticket 22692
    11011034     * @dataProvider data_smart_dashes
    1102      *
    1103      * @covers ::wptexturize
    11041035     */
    11051036    public function test_smart_dashes( $input, $output ) {
     
    11551086     * @ticket 22692
    11561087     * @dataProvider data_misc_static_replacements
    1157      *
    1158      * @covers ::wptexturize
    11591088     */
    11601089    public function test_misc_static_replacements( $input, $output ) {
     
    12121141     * @ticket 8775
    12131142     * @dataProvider data_quoted_numbers
    1214      *
    1215      * @covers ::wptexturize
    12161143     */
    12171144    public function test_quoted_numbers( $input, $output ) {
     
    12651192     * @ticket 20342
    12661193     * @dataProvider data_quotes_and_dashes
    1267      *
    1268      * @covers ::wptexturize
    12691194     */
    12701195    public function test_quotes_and_dashes( $input, $output ) {
     
    13301255     * @ticket 12690
    13311256     * @dataProvider data_tag_avoidance
    1332      *
    1333      * @covers ::wptexturize
    13341257     */
    13351258    public function test_tag_avoidance( $input, $output ) {
     
    15551478     * @ticket 26850
    15561479     * @dataProvider data_year_abbr
    1557      *
    1558      * @covers ::wptexturize
    15591480     */
    15601481    public function test_year_abbr( $input, $output ) {
     
    16461567     * @ticket 27426
    16471568     * @dataProvider data_translate
    1648      *
    1649      * @covers ::wptexturize
    16501569     */
    16511570    public function test_translate( $input, $output ) {
     
    18751794     * @ticket 28483
    18761795     * @dataProvider data_element_stack
    1877      *
    1878      * @covers ::wptexturize
    18791796     */
    18801797    public function test_element_stack( $input, $output ) {
     
    19281845     * @ticket 29557
    19291846     * @dataProvider data_unregistered_shortcodes
    1930      *
    1931      * @covers ::wptexturize
    19321847     */
    19331848    public function test_unregistered_shortcodes( $input, $output ) {
     
    20151930     * @ticket 29256
    20161931     * @dataProvider data_primes_vs_quotes
    2017      *
    2018      * @covers ::wptexturize
    20191932     */
    20201933    public function test_primes_vs_quotes( $input, $output ) {
     
    20791992     * @ticket 29256
    20801993     * @dataProvider data_primes_quotes_translation
    2081      *
    2082      * @covers ::wptexturize
    20831994     */
    20841995    public function test_primes_quotes_translation( $input, $output ) {
     
    21972108     *
    21982109     * @ticket 35864
    2199      *
    2200      * @covers ::wptexturize
    22012110     */
    22022111    public function test_trailing_less_than() {
Note: See TracChangeset for help on using the changeset viewer.