Make WordPress Core

Changeset 53562


Ignore:
Timestamp:
06/23/2022 08:27:34 PM (2 years ago)
Author:
azaozz
Message:

Build/Test Tools, Formatting group:

  • Add and update @covers tags.
  • Add and improve docs and inline comments.

Props pbeane, hellofromTonya, antonvlasenko, ironprogrammer, SergeyBiryukov, costdev.
See #39265.

Location:
trunk/tests/phpunit/tests/formatting
Files:
60 edited

Legend:

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

    r53205 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::balanceTags
    57 */
    68class Tests_Formatting_BalanceTags extends WP_UnitTestCase {
     
    7981     * These are valid custom elements but we don't support them yet.
    8082     *
    81      * @see https://html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name
     83     * @see https://w3c.github.io/webcomponents/spec/custom/#valid-custom-element-name
    8284     */
    8385    public function unsupported_valid_tag_names() {
  • trunk/tests/phpunit/tests/formatting/capitalPDangit.php

    r52010 r53562  
    44/**
    55 * @group formatting
     6 *
     7 * @covers ::capital_P_dangit
    68 */
    79class Tests_Formatting_CapitalPDangit extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/cleanPre.php

    r52010 r53562  
    77 * @group formatting
    88 * @expectedDeprecated clean_pre
     9 *
     10 * @covers ::clean_pre
    911 */
    1012class Tests_Formatting_CleanPre extends WP_UnitTestCase {
     
    2325    }
    2426
    25     // I don't think this can ever happen in production;
    26     // <br> is changed to <br /> elsewhere. Left in because
    27     // that replacement shouldn't happen (what if you want
    28     // HTML 4 output?).
     27
     28    /**
     29     * I don't think this can ever happen in production;
     30     * <br> is changed to <br /> elsewhere. Left in because
     31     * that replacement shouldn't happen (what if you want
     32     * HTML 4 output?).
     33     */
    2934    public function test_removes_html_br() {
    3035        $source = 'a b c\n<br>sldfj<br>';
  • trunk/tests/phpunit/tests/formatting/convertInvalidEntries.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::convert_invalid_entities
    57 */
    68class Tests_Formatting_ConvertInvalidEntities extends WP_UnitTestCase {
     
    2022    }
    2123
     24    /**
     25     * @covers ::convert_chars
     26     */
    2227    public function test_escapes_lone_ampersands() {
    2328        $this->assertSame( 'at&#038;t', convert_chars( 'at&t' ) );
  • trunk/tests/phpunit/tests/formatting/convertSmilies.php

    r52010 r53562  
    44 * @group formatting
    55 * @group emoji
     6 *
     7 * @covers ::convert_smilies
    68 */
    79class Tests_Formatting_ConvertSmilies extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/date.php

    r52010 r53562  
    1111     *
    1212     * @ticket 20328
     13     *
     14     * @covers ::get_date_from_gmt
    1315     */
    1416    public function test_get_date_from_gmt_outside_of_dst() {
     
    2325     *
    2426     * @ticket 20328
     27     *
     28     * @covers ::get_date_from_gmt
    2529     */
    2630    public function test_get_date_from_gmt_during_dst() {
     
    3337    /**
    3438     * @ticket 20328
     39     *
     40     * @covers ::get_gmt_from_date
    3541     */
    3642    public function test_get_gmt_from_date_outside_of_dst() {
     
    4349    /**
    4450     * @ticket 20328
     51     *
     52     * @covers ::get_gmt_from_date
    4553     */
    4654    public function test_get_gmt_from_date_during_dst() {
     
    5361    /**
    5462     * @ticket 34279
     63     *
     64     * @covers ::get_date_from_gmt
     65     *
    5566     */
    5667    public function test_get_date_and_time_from_gmt_no_timezone() {
     
    6273    /**
    6374     * @ticket 34279
     75     *
     76     * @covers ::get_gmt_from_date
    6477     */
    6578    public function test_get_gmt_from_date_no_timezone() {
     
    7184    /**
    7285     * @ticket 34279
     86     *
     87     * @covers ::get_gmt_from_date
    7388     */
    7489    public function test_get_gmt_from_date_short_date() {
     
    8196    /**
    8297     * @ticket 34279
     98     *
     99     * @covers ::get_gmt_from_date
    83100     */
    84101    public function test_get_gmt_from_date_string_date() {
     
    91108    /**
    92109     * @ticket 34279
     110     *
     111     * @covers ::get_gmt_from_date
    93112     */
    94113    public function test_get_gmt_from_date_string_date_no_timezone() {
     
    102121     *
    103122     * @dataProvider timezone_provider
     123     *
     124     * @covers ::get_gmt_from_date
    104125     */
    105126    public function test_gmt_from_date_correct_time( $timezone_string, $gmt_offset ) {
     
    118139     *
    119140     * @dataProvider timezone_provider
     141     *
     142     * @covers ::get_date_from_gmt
    120143     */
    121144    public function test_date_from_gmt_correct_time( $timezone_string, $gmt_offset ) {
     
    134157     *
    135158     * @dataProvider timezone_provider
     159     *
     160     * @covers ::iso8601_to_datetime
    136161     */
    137162    public function test_is8601_to_datetime_correct_time( $timezone_string, $gmt_offset ) {
  • trunk/tests/phpunit/tests/formatting/emoji.php

    r53150 r53562  
    1212    /**
    1313     * @ticket 36525
     14     *
     15     * @covers ::_print_emoji_detection_script
    1416     */
    1517    public function test_unfiltered_emoji_cdns() {
     
    2830    /**
    2931     * @ticket 36525
     32     *
     33     * @covers ::_print_emoji_detection_script
    3034     */
    3135    public function test_filtered_emoji_svn_cdn() {
     
    5155    /**
    5256     * @ticket 36525
     57     *
     58     * @covers ::_print_emoji_detection_script
    5359     */
    5460    public function test_filtered_emoji_png_cdn() {
     
    7076    /**
    7177     * @ticket 41501
     78     *
     79     * @covers ::_wp_emoji_list
    7280     */
    7381    public function test_wp_emoji_list_returns_data() {
     
    114122     * @ticket 35293
    115123     * @dataProvider data_wp_encode_emoji
     124     *
     125     * @covers ::wp_encode_emoji
    116126     */
    117127    public function test_wp_encode_emoji( $emoji, $expected ) {
     
    149159     * @ticket 35293
    150160     * @dataProvider data_wp_staticize_emoji
     161     *
     162     * @covers ::wp_staticize_emoji
    151163     */
    152164    public function test_wp_staticize_emoji( $emoji, $expected ) {
  • trunk/tests/phpunit/tests/formatting/ent2ncr.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::ent2ncr
    57 */
    68class Tests_Formatting_Ent2ncr extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/escAttr.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::esc_attr
    57 */
    68class Tests_Formatting_EscAttr extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/escHtml.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::esc_html
    57 */
    68class Tests_Formatting_EscHtml extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/escJs.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::esc_js
    57 */
    68class Tests_Formatting_EscJs extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/escTextarea.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::esc_textarea
    57 */
    68class Tests_Formatting_EscTextarea extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/escUrl.php

    r53455 r53562  
    88    /**
    99     * @ticket 23605
     10     *
     11     * @covers ::esc_url
    1012     */
    1113    public function test_spaces() {
     
    2022    }
    2123
     24    /**
     25     * @covers ::esc_url
     26     */
    2227    public function test_bad_characters() {
    2328        $this->assertSame( 'http://example.com/watchthelinefeedgo', esc_url( 'http://example.com/watchthelinefeed%0Ago' ) );
     
    3439    }
    3540
     41    /**
     42     * @covers ::esc_url
     43     */
    3644    public function test_relative() {
    3745        $this->assertSame( '/example.php', esc_url( '/example.php' ) );
     
    4149    }
    4250
     51    /**
     52     * @covers ::esc_url
     53     * @covers ::esc_url_raw
     54     */
    4355    public function test_all_url_parts() {
    4456        $url = 'https://user:pass@host.example.com:1234/path;p=1?query=2&r[]=3#fragment';
     
    5769            parse_url( $url )
    5870        );
    59         $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', sanitize_url( $url ) );
     71        $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url_raw( $url ) );
    6072        $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&#038;r%5B%5D=3#fragment', esc_url( $url ) );
    6173    }
    6274
     75    /**
     76     * @covers ::esc_url
     77     */
    6378    public function test_bare() {
    6479        $this->assertSame( 'http://example.com?foo', esc_url( 'example.com?foo' ) );
     
    6984    }
    7085
     86    /**
     87     * @covers ::esc_url
     88     * @covers ::esc_url_raw
     89     */
    7190    public function test_encoding() {
    72         $this->assertSame( 'http://example.com?foo=1&bar=2', sanitize_url( 'http://example.com?foo=1&bar=2' ) );
    73         $this->assertSame( 'http://example.com?foo=1&amp;bar=2', sanitize_url( 'http://example.com?foo=1&amp;bar=2' ) );
    74         $this->assertSame( 'http://example.com?foo=1&#038;bar=2', sanitize_url( 'http://example.com?foo=1&#038;bar=2' ) );
     91        $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) );
     92        $this->assertSame( 'http://example.com?foo=1&amp;bar=2', esc_url_raw( 'http://example.com?foo=1&amp;bar=2' ) );
     93        $this->assertSame( 'http://example.com?foo=1&#038;bar=2', esc_url_raw( 'http://example.com?foo=1&#038;bar=2' ) );
    7594
    7695        $this->assertSame( 'http://example.com?foo=1&#038;bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) );
     
    82101    }
    83102
     103    /**
     104     * @covers ::esc_url
     105     * @covers ::wp_allowed_protocols
     106     */
    84107    public function test_protocol() {
    85108        $this->assertSame( 'http://example.com', esc_url( 'http://example.com' ) );
     
    146169    /**
    147170     * @ticket 23187
     171     *
     172     * @covers ::esc_url
    148173     */
    149174    public function test_protocol_case() {
     
    152177    }
    153178
     179    /**
     180     * @covers ::esc_url
     181     */
    154182    public function test_display_extras() {
    155183        $this->assertSame( 'http://example.com/&#039;quoted&#039;', esc_url( 'http://example.com/\'quoted\'' ) );
     
    157185    }
    158186
     187    /**
     188     * @covers ::esc_url
     189     */
    159190    public function test_non_ascii() {
    160191        $this->assertSame( 'http://example.org/баба', esc_url( 'http://example.org/баба' ) );
     
    163194    }
    164195
     196    /**
     197     * @covers ::esc_url
     198     */
    165199    public function test_feed() {
    166200        $this->assertSame( '', esc_url( 'feed:javascript:alert(1)' ) );
     
    173207    /**
    174208     * @ticket 16859
     209     *
     210     * @covers ::esc_url
    175211     */
    176212    public function test_square_brackets() {
     
    188224    /**
    189225     * Courtesy of http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding
     226     *
     227     * @covers ::esc_url_raw
    190228     */
    191229    public function test_reserved_characters() {
    192230        $url = "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$%27()*+,;=/?:@-._~!$%27()*+,;==#/?:@-._~!$&'()*+,;=";
    193         $this->assertSame( $url, sanitize_url( $url ) );
     231        $this->assertSame( $url, esc_url_raw( $url ) );
    194232    }
    195233
    196234    /**
    197235     * @ticket 21974
     236     *
     237     * @covers ::esc_url
    198238     */
    199239    public function test_protocol_relative_with_colon() {
     
    203243    /**
    204244     * @ticket 31632
     245     *
     246     * @covers ::esc_url
    205247     */
    206248    public function test_mailto_with_newline() {
     
    218260    /**
    219261     * @ticket 31632
     262     *
     263     * @covers ::esc_url
    220264     */
    221265    public function test_mailto_in_http_url_with_newline() {
     
    233277    /**
    234278     * @ticket 23605
     279     *
     280     * @covers ::esc_url
    235281     */
    236282    public function test_mailto_with_spaces() {
     
    244290    /**
    245291     * @ticket 28015
     292     *
     293     * @covers ::esc_url_raw
    246294     */
    247295    public function test_invalid_charaters() {
    248         $this->assertEmpty( sanitize_url( '"^<>{}`' ) );
     296        $this->assertEmpty( esc_url_raw( '"^<>{}`' ) );
    249297    }
    250298
    251299    /**
    252300     * @ticket 34202
     301     *
     302     * @covers ::esc_url
    253303     */
    254304    public function test_ipv6_hosts() {
  • trunk/tests/phpunit/tests/formatting/escXml.php

    r53144 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::esc_xml
    57 */
    68class Tests_Formatting_EscXml extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/excerptRemoveBlocks.php

    r52010 r53562  
    33/**
    44 * @group formatting
    5  * @covers ::excerpt_remove_blocks
    65 * @ticket 46133
    76 */
     
    9291     *
    9392     * @ticket 46133
     93     *
     94     * @covers ::excerpt_remove_blocks
    9495     */
    9596    public function test_excerpt_remove_blocks() {
     
    117118     *
    118119     * @ticket 46133
     120     *
     121     * @covers ::do_blocks
    119122     */
    120123    public function test_excerpt_infinite_loop() {
  • trunk/tests/phpunit/tests/formatting/getBloginfo.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::get_bloginfo
    57 */
    68class Tests_Formatting_GetBloginfo extends WP_UnitTestCase {
     
    3638    /**
    3739     * @ticket 27942
     40     * @covers ::sanitize_option
    3841     */
    3942    public function test_bloginfo_sanitize_option() {
  • trunk/tests/phpunit/tests/formatting/getUrlInContent.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::get_url_in_content
    57 */
    68class Tests_Formatting_GetUrlInContent extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/humanTimeDiff.php

    r52010 r53562  
    44 * @group formatting
    55 * @ticket 38773
     6 *
     7 * @covers ::human_time_diff
    68 */
    79class Tests_Formatting_HumanTimeDiff extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/isEmail.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::is_email
    57 */
    68class Tests_Formatting_IsEmail extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/likeEscape.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::like_escape
    57 */
    68class Tests_Formatting_LikeEscape extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/linksAddTarget.php

    r52010 r53562  
    22/**
    33 * @group formatting
     4 *
     5 * @covers ::links_add_target
    46 */
    57class Tests_Formatting_LinksAddTarget extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/makeClickable.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::make_clickable
    57 */
    68class Tests_Formatting_MakeClickable extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/mapDeep.php

    r51623 r53562  
    44 * @group formatting
    55 * @ticket 22300
     6 *
     7 * @covers ::map_deep
    68 */
    79class Tests_Formatting_MapDeep extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/normalizeWhitespace.php

    r52010 r53562  
    22/**
    33 * @group formatting
     4 *
     5 * @covers ::normalize_whitespace
    46 */
    57class Tests_Formatting_NormalizeWhitespace extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/redirect.php

    r52010 r53562  
    2323     * @param string $location The path or URL to redirect to.
    2424     * @param int    $status   HTTP response status code to use.
     25     *
     26     * @covers ::wp_redirect
    2527     */
    2628    public function test_wp_redirect_bad_status_code( $location, $status ) {
     
    4244    }
    4345
     46    /**
     47     * @covers ::wp_sanitize_redirect
     48     */
    4449    public function test_wp_sanitize_redirect() {
    4550        $this->assertSame( 'http://example.com/watchthelinefeedgo', wp_sanitize_redirect( 'http://example.com/watchthelinefeed%0Ago' ) );
     
    6065    /**
    6166     * @ticket 36998
     67     *
     68     * @covers ::wp_sanitize_redirect
    6269     */
    6370    public function test_wp_sanitize_redirect_should_encode_spaces() {
     
    6875    /**
    6976     * @dataProvider valid_url_provider
     77     *
     78     * @covers ::wp_validate_redirect
    7079     */
    7180    public function test_wp_validate_redirect_valid_url( $url, $expected ) {
     
    7584    /**
    7685     * @dataProvider invalid_url_provider
     86     *
     87     * @covers ::wp_validate_redirect
    7788     */
    7889    public function test_wp_validate_redirect_invalid_url( $url ) {
     
    167178     * @ticket 47980
    168179     * @dataProvider relative_url_provider
     180     *
     181     * @covers ::wp_validate_redirect
    169182     */
    170183    public function test_wp_validate_redirect_relative_url( $current_uri, $url, $expected ) {
  • trunk/tests/phpunit/tests/formatting/removeAccents.php

    r52809 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::remove_accents
    57 */
    68class Tests_Formatting_RemoveAccents extends WP_UnitTestCase {
     9
    710    public function test_remove_accents_simple() {
    811        $this->assertSame( 'abcdefghijkl', remove_accents( 'abcdefghijkl' ) );
  • trunk/tests/phpunit/tests/formatting/sanitizeFileName.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::sanitize_file_name
    57 */
    68class Tests_Formatting_SanitizeFileName extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/sanitizeMimeType.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::sanitize_mime_type
    57 */
    68class Tests_Formatting_SanitizeMimeType extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/sanitizeOrderby.php

    r52010 r53562  
    33/**
    44 * @group sanitize_sql_orderby
     5 *
     6 * @covers ::sanitize_sql_orderby
    57 */
    68class Tests_Formatting_SanitizeOrderby extends WP_UnitTestCase {
    79
    810    /**
    9      * @covers ::sanitize_sql_orderby
    1011     * @dataProvider valid_orderbys
    1112     */
     
    3435
    3536    /**
    36      * @covers ::sanitize_sql_orderby
    3737     * @dataProvider invalid_orderbys
    3838     */
  • trunk/tests/phpunit/tests/formatting/sanitizePost.php

    r52010 r53562  
    33 * @group formatting
    44 * @group post
     5 *
     6 * @covers WP_Post::__construct
    57 */
    68class Tests_Formatting_SanitizePost extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/sanitizeTextField.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::sanitize_text_field
     7 * @covers ::sanitize_textarea_field
    58 */
    69class Tests_Formatting_SanitizeTextField extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/sanitizeTitle.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::sanitize_title
    57 */
    68class Tests_Formatting_SanitizeTitle extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::sanitize_title_with_dashes
    57 */
    68class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/sanitizeTrackbackUrls.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::sanitize_trackback_urls
    57 */
    68class Tests_Formatting_SanitizeTrackbackUrls extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/sanitizeUser.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::sanitize_user
    57 */
    68class Tests_Formatting_SanitizeUser extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/seemsUtf8.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::seems_utf8
    57 */
    68class Tests_Formatting_SeemsUtf8 extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/slashit.php

    r52010 r53562  
    55 */
    66class Tests_Formatting_Slashit extends WP_UnitTestCase {
     7
     8    /**
     9     * @covers ::backslashit
     10     */
    711    public function test_backslashes_middle_numbers() {
    812        $this->assertSame( "\\a-!9\\a943\\b\\c", backslashit( 'a-!9a943bc' ) );
    913    }
    1014
     15    /**
     16     * @covers ::backslashit
     17     */
    1118    public function test_backslashes_alphas() {
    1219        $this->assertSame( "\\a943\\b\\c", backslashit( 'a943bc' ) );
    1320    }
    1421
     22    /**
     23     * @covers ::backslashit
     24     */
    1525    public function test_double_backslashes_leading_numbers() {
    1626        $this->assertSame( '\\\\95', backslashit( '95' ) );
    1727    }
    1828
     29    /**
     30     * @covers ::untrailingslashit
     31     */
    1932    public function test_removes_trailing_slashes() {
    2033        $this->assertSame( 'a', untrailingslashit( 'a/' ) );
     
    2437    /**
    2538     * @ticket 22267
     39     *
     40     * @covers ::untrailingslashit
    2641     */
    2742    public function test_removes_trailing_backslashes() {
     
    3247    /**
    3348     * @ticket 22267
     49     *
     50     * @covers ::untrailingslashit
    3451     */
    3552    public function test_removes_trailing_mixed_slashes() {
     
    3855    }
    3956
     57    /**
     58     * @covers ::trailingslashit
     59     */
    4060    public function test_adds_trailing_slash() {
    4161        $this->assertSame( 'a/', trailingslashit( 'a' ) );
    4262    }
    4363
     64    /**
     65     * @covers ::trailingslashit
     66     */
    4467    public function test_does_not_add_trailing_slash_if_one_exists() {
    4568        $this->assertSame( 'a/', trailingslashit( 'a/' ) );
     
    4871    /**
    4972     * @ticket 22267
     73     *
     74     * @covers ::trailingslashit
    5075     */
    5176    public function test_converts_trailing_backslash_to_slash_if_one_exists() {
  • trunk/tests/phpunit/tests/formatting/stripslashesDeep.php

    r52010 r53562  
    44 * @group formatting
    55 * @group slashes
     6 *
     7 * @covers ::stripslashes_deep
    68 */
    79class Tests_Formatting_StripslashesDeep extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/urlShorten.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::url_shorten
    57 */
    68class Tests_Formatting_UrlShorten extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/urlencodeDeep.php

    r51623 r53562  
    44 * @group formatting
    55 * @ticket 22300
     6 *
     7 * @covers ::urlencode_deep
    68 */
    79class Tests_Formatting_UrlencodeDeep extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/utf8UriEncode.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::utf8_uri_encode
    57 */
    68class Tests_Formatting_Utf8UriEncode extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpAutop.php

    r52789 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wpautop
    57 */
    68class Tests_Formatting_wpAutop extends WP_UnitTestCase {
     
    542544     * wpautop() should not add extra </p> before <figcaption>
    543545     *
    544      * @covers ::wpautop
     546     * @ticket 39307
     547     *
    545548     * @uses ::trim
    546      *
    547      * @ticket 39307
    548549     */
    549550    public function test_that_wpautop_does_not_add_extra_closing_p_in_figure() {
  • trunk/tests/phpunit/tests/formatting/wpBasename.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5
     6 * @covers ::wp_basename
    57 */
    68class Tests_Formatting_wpBasename extends WP_UnitTestCase {
     
    3941        );
    4042    }
    41 
    4243}
  • trunk/tests/phpunit/tests/formatting/wpHtmlExcerpt.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_html_excerpt
    57 */
    68class Tests_Formatting_wpHtmlExcerpt extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpHtmlSplit.php

    r52010 r53562  
    1010     *
    1111     * @dataProvider data_basic_features
     12     *
     13     * @covers ::wp_html_split
    1214     */
    1315    public function test_basic_features( $input, $output ) {
     
    4042     *
    4143     * @dataProvider data_whole_posts
     44     *
     45     * @covers ::preg_split
    4246     */
    4347    public function test_pcre_performance( $input ) {
  • trunk/tests/phpunit/tests/formatting/wpHtmleditPre.php

    r52010 r53562  
    44 * @group formatting
    55 * @expectedDeprecated wp_htmledit_pre
     6 *
     7 * @covers ::wp_htmledit_pre
    68 */
    79class Tests_Formatting_wpHtmleditPre extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpIsoDescrambler.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_iso_descrambler
    57 */
    68class Tests_Formatting_wpIsoDescrambler extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpMakeLinkRelative.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_make_link_relative
    57 */
    68class Tests_Formatting_wpMakeLinkRelative extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpRelNofollow.php

    r51968 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_rel_nofollow
    57 */
    68class Tests_Formatting_wpRelNofollow extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpRelUgc.php

    r51968 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_rel_ugc
    57 */
    68class Tests_Formatting_wpRelUgc extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpReplaceInHtmlTags.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_replace_in_html_tags
    57 */
    68class Tests_Formatting_wpReplaceInHtmlTags extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpRicheditPre.php

    r52010 r53562  
    44 * @group formatting
    55 * @expectedDeprecated wp_richedit_pre
     6 *
     7 * @covers ::wp_richedit_pre
    68 */
    79class Tests_Formatting_wpRicheditPre extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpSlash.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_slash
    57 */
    68class Tests_Formatting_wpSlash extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpSpecialchars.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::_wp_specialchars
    57 */
    68class Tests_Formatting_wpSpecialchars extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpStripAllTags.php

    r52010 r53562  
    44 *
    55 * @group formatting
     6 *
     7 * @covers ::wp_strip_all_tags
    68 */
    79class Tests_Formatting_wpStripAllTags extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpTargetedLinkRel.php

    r51623 r53562  
    44 * @group formatting
    55 * @ticket 43187
     6 *
     7 * @covers ::wp_targeted_link_rel
    68 */
    79class Tests_Formatting_wpTargetedLinkRel extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/wpTexturize.php

    r52010 r53562  
    55 */
    66class Tests_Formatting_wpTexturize extends WP_UnitTestCase {
     7
     8    /**
     9     * @covers ::wptexturize
     10     */
    711    public function test_dashes() {
    812        $this->assertSame( 'Hey &#8212; boo?', wptexturize( 'Hey -- boo?' ) );
     
    1014    }
    1115
     16    /**
     17     * @covers ::wptexturize
     18     */
    1219    public function test_disable() {
    1320        $this->assertSame( '<pre>---&</pre>', wptexturize( '<pre>---&</pre>' ) );
     
    3542    /**
    3643     * @ticket 1418
     44     *
     45     * @covers ::wptexturize
    3746     */
    3847    public function test_bracketed_quotes_1418() {
     
    4453    /**
    4554     * @ticket 3810
     55     *
     56     * @covers ::wptexturize
    4657     */
    4758    public function test_bracketed_quotes_3810() {
     
    5162    /**
    5263     * @ticket 4539
     64     *
     65     * @covers ::wptexturize
    5366     */
    5467    public function test_basic_quotes() {
     
    7487     * @ticket 4539
    7588     * @ticket 15241
     89     *
     90     * @covers ::wptexturize
    7691     */
    7792    public function test_full_sentences_with_unmatched_single_quotes() {
     
    8499    /**
    85100     * @ticket 4539
     101     *
     102     * @covers ::wptexturize
    86103     */
    87104    public function test_quotes() {
     
    103120    /**
    104121     * @ticket 4539
     122     *
     123     * @covers ::wptexturize
    105124     */
    106125    public function test_quotes_before_s() {
     
    114133    /**
    115134     * @ticket 4539
     135     *
     136     * @covers ::wptexturize
    116137     */
    117138    public function test_quotes_before_numbers() {
     
    142163    }
    143164
     165    /**
     166     * @covers ::wptexturize
     167     */
    144168    public function test_quotes_after_numbers() {
    145169        $this->assertSame( 'Class of &#8217;99', wptexturize( "Class of '99" ) );
     
    149173     * @ticket 4539
    150174     * @ticket 15241
     175     *
     176     * @covers ::wptexturize
    151177     */
    152178    public function test_other_html() {
     
    156182    }
    157183
     184    /**
     185     * @covers ::wptexturize
     186     */
    158187    public function test_x() {
    159188        $this->assertSame( '14&#215;24', wptexturize( '14x24' ) );
    160189    }
    161190
     191    /**
     192     * @covers ::wptexturize
     193     */
    162194    public function test_minutes_seconds() {
    163195        $this->assertSame( '9&#8242;', wptexturize( '9\'' ) );
     
    173205    /**
    174206     * @ticket 8775
     207     *
     208     * @covers ::wptexturize
    175209     */
    176210    public function test_wptexturize_quotes_around_numbers() {
     
    183217    /**
    184218     * @ticket 8912
     219     *
     220     * @covers ::wptexturize
    185221     */
    186222    public function test_wptexturize_html_comments() {
     
    193229     * @ticket 4539
    194230     * @ticket 15241
     231     *
     232     * @covers ::wptexturize
    195233     */
    196234    public function test_entity_quote_cuddling() {
     
    201239    /**
    202240     * @ticket 22823
     241     *
     242     * @covers ::wptexturize
    203243     */
    204244    public function test_apostrophes_before_primes() {
     
    208248    /**
    209249     * @ticket 23185
     250     *
     251     * @covers ::wptexturize
    210252     */
    211253    public function test_spaces_around_hyphens() {
     
    231273    /**
    232274     * @ticket 31030
     275     *
     276     * @covers ::wptexturize
    233277     */
    234278    public function test_hyphens_at_start_and_end() {
     
    248292     *
    249293     * @ticket 22692
     294     *
     295     * @covers ::wptexturize
    250296     */
    251297    public function test_spaces_around_quotes_never() {
     
    265311     * @ticket 22692
    266312     * @dataProvider data_spaces_around_quotes
     313     *
     314     * @covers ::wptexturize
    267315     */
    268316    public function test_spaces_around_quotes( $input, $output ) {
    269         return $this->assertSame( $output, wptexturize( $input ) );
     317        $this->assertSame( $output, wptexturize( $input ) );
    270318    }
    271319
     
    321369     * @ticket 22692
    322370     * @dataProvider data_apos_before_digits
     371     *
     372     * @covers ::wptexturize
    323373     */
    324374    public function test_apos_before_digits( $input, $output ) {
    325         return $this->assertSame( $output, wptexturize( $input ) );
     375        $this->assertSame( $output, wptexturize( $input ) );
    326376    }
    327377
     
    362412     * @ticket 22692
    363413     * @dataProvider data_opening_single_quote
     414     *
     415     * @covers ::wptexturize
    364416     */
    365417    public function test_opening_single_quote( $input, $output ) {
    366         return $this->assertSame( $output, wptexturize( $input ) );
     418        $this->assertSame( $output, wptexturize( $input ) );
    367419    }
    368420
     
    491543     * @ticket 22692
    492544     * @dataProvider data_double_prime
     545     *
     546     * @covers ::wptexturize
    493547     */
    494548    public function test_double_prime( $input, $output ) {
    495         return $this->assertSame( $output, wptexturize( $input ) );
     549        $this->assertSame( $output, wptexturize( $input ) );
    496550    }
    497551
     
    524578     * @ticket 22692
    525579     * @dataProvider data_single_prime
     580     *
     581     * @covers ::wptexturize
    526582     */
    527583    public function test_single_prime( $input, $output ) {
    528         return $this->assertSame( $output, wptexturize( $input ) );
     584        $this->assertSame( $output, wptexturize( $input ) );
    529585    }
    530586
     
    557613     * @ticket 22692
    558614     * @dataProvider data_contractions
     615     *
     616     * @covers ::wptexturize
    559617     */
    560618    public function test_contractions( $input, $output ) {
    561         return $this->assertSame( $output, wptexturize( $input ) );
     619        $this->assertSame( $output, wptexturize( $input ) );
    562620    }
    563621
     
    598656     * @ticket 22692
    599657     * @dataProvider data_opening_quote
     658     *
     659     * @covers ::wptexturize
    600660     */
    601661    public function test_opening_quote( $input, $output ) {
    602         return $this->assertSame( $output, wptexturize( $input ) );
     662        $this->assertSame( $output, wptexturize( $input ) );
    603663    }
    604664
     
    675735     * @ticket 22692
    676736     * @dataProvider data_closing_quote
     737     *
     738     * @covers ::wptexturize
    677739     */
    678740    public function test_closing_quote( $input, $output ) {
    679         return $this->assertSame( $output, wptexturize( $input ) );
     741        $this->assertSame( $output, wptexturize( $input ) );
    680742    }
    681743
     
    764826     * @ticket 22692
    765827     * @dataProvider data_closing_single_quote
     828     *
     829     * @covers ::wptexturize
    766830     */
    767831    public function test_closing_single_quote( $input, $output ) {
    768         return $this->assertSame( $output, wptexturize( $input ) );
     832        $this->assertSame( $output, wptexturize( $input ) );
    769833    }
    770834
     
    854918     * @ticket 30445
    855919     * @dataProvider data_multiplication
     920     *
     921     * @covers ::wptexturize
    856922     */
    857923    public function test_multiplication( $input, $output ) {
    858         return $this->assertSame( $output, wptexturize( $input ) );
     924        $this->assertSame( $output, wptexturize( $input ) );
    859925    }
    860926
     
    904970     * @ticket 22692
    905971     * @dataProvider data_ampersand
     972     *
     973     * @covers ::wptexturize
    906974     */
    907975    public function test_ampersand( $input, $output ) {
    908         return $this->assertSame( $output, wptexturize( $input ) );
     976        $this->assertSame( $output, wptexturize( $input ) );
    909977    }
    910978
     
    9691037     * @ticket 22692
    9701038     * @dataProvider data_cockney
     1039     *
     1040     * @covers ::wptexturize
    9711041     */
    9721042    public function test_cockney( $input, $output ) {
    973         return $this->assertSame( $output, wptexturize( $input ) );
     1043        $this->assertSame( $output, wptexturize( $input ) );
    9741044    }
    9751045
     
    10301100     * @ticket 22692
    10311101     * @dataProvider data_smart_dashes
     1102     *
     1103     * @covers ::wptexturize
    10321104     */
    10331105    public function test_smart_dashes( $input, $output ) {
    1034         return $this->assertSame( $output, wptexturize( $input ) );
     1106        $this->assertSame( $output, wptexturize( $input ) );
    10351107    }
    10361108
     
    10831155     * @ticket 22692
    10841156     * @dataProvider data_misc_static_replacements
     1157     *
     1158     * @covers ::wptexturize
    10851159     */
    10861160    public function test_misc_static_replacements( $input, $output ) {
    1087         return $this->assertSame( $output, wptexturize( $input ) );
     1161        $this->assertSame( $output, wptexturize( $input ) );
    10881162    }
    10891163
     
    11381212     * @ticket 8775
    11391213     * @dataProvider data_quoted_numbers
     1214     *
     1215     * @covers ::wptexturize
    11401216     */
    11411217    public function test_quoted_numbers( $input, $output ) {
    1142         return $this->assertSame( $output, wptexturize( $input ) );
     1218        $this->assertSame( $output, wptexturize( $input ) );
    11431219    }
    11441220
     
    11891265     * @ticket 20342
    11901266     * @dataProvider data_quotes_and_dashes
     1267     *
     1268     * @covers ::wptexturize
    11911269     */
    11921270    public function test_quotes_and_dashes( $input, $output ) {
    1193         return $this->assertSame( $output, wptexturize( $input ) );
     1271        $this->assertSame( $output, wptexturize( $input ) );
    11941272    }
    11951273
     
    12521330     * @ticket 12690
    12531331     * @dataProvider data_tag_avoidance
     1332     *
     1333     * @covers ::wptexturize
    12541334     */
    12551335    public function test_tag_avoidance( $input, $output ) {
    1256         return $this->assertSame( $output, wptexturize( $input ) );
     1336        $this->assertSame( $output, wptexturize( $input ) );
    12571337    }
    12581338
     
    14751555     * @ticket 26850
    14761556     * @dataProvider data_year_abbr
     1557     *
     1558     * @covers ::wptexturize
    14771559     */
    14781560    public function test_year_abbr( $input, $output ) {
    1479         return $this->assertSame( $output, wptexturize( $input ) );
     1561        $this->assertSame( $output, wptexturize( $input ) );
    14801562    }
    14811563
     
    15641646     * @ticket 27426
    15651647     * @dataProvider data_translate
     1648     *
     1649     * @covers ::wptexturize
    15661650     */
    15671651    public function test_translate( $input, $output ) {
     
    15731657        wptexturize( 'reset', true );
    15741658
    1575         return $this->assertSame( $output, $result );
     1659        $this->assertSame( $output, $result );
    15761660    }
    15771661
     
    17911875     * @ticket 28483
    17921876     * @dataProvider data_element_stack
     1877     *
     1878     * @covers ::wptexturize
    17931879     */
    17941880    public function test_element_stack( $input, $output ) {
    1795         return $this->assertSame( $output, wptexturize( $input ) );
     1881        $this->assertSame( $output, wptexturize( $input ) );
    17961882    }
    17971883
     
    18421928     * @ticket 29557
    18431929     * @dataProvider data_unregistered_shortcodes
     1930     *
     1931     * @covers ::wptexturize
    18441932     */
    18451933    public function test_unregistered_shortcodes( $input, $output ) {
     
    19272015     * @ticket 29256
    19282016     * @dataProvider data_primes_vs_quotes
     2017     *
     2018     * @covers ::wptexturize
    19292019     */
    19302020    public function test_primes_vs_quotes( $input, $output ) {
    1931         return $this->assertSame( $output, wptexturize( $input ) );
     2021        $this->assertSame( $output, wptexturize( $input ) );
    19322022    }
    19332023
     
    19892079     * @ticket 29256
    19902080     * @dataProvider data_primes_quotes_translation
     2081     *
     2082     * @covers ::wptexturize
    19912083     */
    19922084    public function test_primes_quotes_translation( $input, $output ) {
     
    19982090        wptexturize( 'reset', true );
    19992091
    2000         return $this->assertSame( $output, $result );
     2092        $this->assertSame( $output, $result );
    20012093    }
    20022094
     
    20822174     *
    20832175     * @dataProvider data_whole_posts
     2176     *
     2177     * @covers ::preg_split
    20842178     */
    20852179    public function test_pcre_performance( $input ) {
     
    21022196     *
    21032197     * @ticket 35864
     2198     *
     2199     * @covers ::wptexturize
    21042200     */
    21052201    public function test_trailing_less_than() {
  • trunk/tests/phpunit/tests/formatting/wpTrimExcerpt.php

    r51968 r53562  
    33/**
    44 * @group formatting
     5 *
    56 * @covers ::wp_trim_excerpt
    67 */
  • trunk/tests/phpunit/tests/formatting/wpTrimWords.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::wp_trim_words
    57 */
    68class Tests_Formatting_wpTrimWords extends WP_UnitTestCase {
  • trunk/tests/phpunit/tests/formatting/zeroise.php

    r52010 r53562  
    33/**
    44 * @group formatting
     5 *
     6 * @covers ::zeroise
    57 */
    68class Tests_Formatting_Zeroise extends WP_UnitTestCase {
Note: See TracChangeset for help on using the changeset viewer.