Changeset 53562
- Timestamp:
- 06/23/2022 08:27:34 PM (2 years ago)
- Location:
- trunk/tests/phpunit/tests/formatting
- Files:
-
- 60 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/balanceTags.php
r53205 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::balanceTags 5 7 */ 6 8 class Tests_Formatting_BalanceTags extends WP_UnitTestCase { … … 79 81 * These are valid custom elements but we don't support them yet. 80 82 * 81 * @see https:// html.spec.whatwg.org/multipage/custom-elements.html#valid-custom-element-name83 * @see https://w3c.github.io/webcomponents/spec/custom/#valid-custom-element-name 82 84 */ 83 85 public function unsupported_valid_tag_names() { -
trunk/tests/phpunit/tests/formatting/capitalPDangit.php
r52010 r53562 4 4 /** 5 5 * @group formatting 6 * 7 * @covers ::capital_P_dangit 6 8 */ 7 9 class Tests_Formatting_CapitalPDangit extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/cleanPre.php
r52010 r53562 7 7 * @group formatting 8 8 * @expectedDeprecated clean_pre 9 * 10 * @covers ::clean_pre 9 11 */ 10 12 class Tests_Formatting_CleanPre extends WP_UnitTestCase { … … 23 25 } 24 26 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 */ 29 34 public function test_removes_html_br() { 30 35 $source = 'a b c\n<br>sldfj<br>'; -
trunk/tests/phpunit/tests/formatting/convertInvalidEntries.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::convert_invalid_entities 5 7 */ 6 8 class Tests_Formatting_ConvertInvalidEntities extends WP_UnitTestCase { … … 20 22 } 21 23 24 /** 25 * @covers ::convert_chars 26 */ 22 27 public function test_escapes_lone_ampersands() { 23 28 $this->assertSame( 'at&t', convert_chars( 'at&t' ) ); -
trunk/tests/phpunit/tests/formatting/convertSmilies.php
r52010 r53562 4 4 * @group formatting 5 5 * @group emoji 6 * 7 * @covers ::convert_smilies 6 8 */ 7 9 class Tests_Formatting_ConvertSmilies extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/date.php
r52010 r53562 11 11 * 12 12 * @ticket 20328 13 * 14 * @covers ::get_date_from_gmt 13 15 */ 14 16 public function test_get_date_from_gmt_outside_of_dst() { … … 23 25 * 24 26 * @ticket 20328 27 * 28 * @covers ::get_date_from_gmt 25 29 */ 26 30 public function test_get_date_from_gmt_during_dst() { … … 33 37 /** 34 38 * @ticket 20328 39 * 40 * @covers ::get_gmt_from_date 35 41 */ 36 42 public function test_get_gmt_from_date_outside_of_dst() { … … 43 49 /** 44 50 * @ticket 20328 51 * 52 * @covers ::get_gmt_from_date 45 53 */ 46 54 public function test_get_gmt_from_date_during_dst() { … … 53 61 /** 54 62 * @ticket 34279 63 * 64 * @covers ::get_date_from_gmt 65 * 55 66 */ 56 67 public function test_get_date_and_time_from_gmt_no_timezone() { … … 62 73 /** 63 74 * @ticket 34279 75 * 76 * @covers ::get_gmt_from_date 64 77 */ 65 78 public function test_get_gmt_from_date_no_timezone() { … … 71 84 /** 72 85 * @ticket 34279 86 * 87 * @covers ::get_gmt_from_date 73 88 */ 74 89 public function test_get_gmt_from_date_short_date() { … … 81 96 /** 82 97 * @ticket 34279 98 * 99 * @covers ::get_gmt_from_date 83 100 */ 84 101 public function test_get_gmt_from_date_string_date() { … … 91 108 /** 92 109 * @ticket 34279 110 * 111 * @covers ::get_gmt_from_date 93 112 */ 94 113 public function test_get_gmt_from_date_string_date_no_timezone() { … … 102 121 * 103 122 * @dataProvider timezone_provider 123 * 124 * @covers ::get_gmt_from_date 104 125 */ 105 126 public function test_gmt_from_date_correct_time( $timezone_string, $gmt_offset ) { … … 118 139 * 119 140 * @dataProvider timezone_provider 141 * 142 * @covers ::get_date_from_gmt 120 143 */ 121 144 public function test_date_from_gmt_correct_time( $timezone_string, $gmt_offset ) { … … 134 157 * 135 158 * @dataProvider timezone_provider 159 * 160 * @covers ::iso8601_to_datetime 136 161 */ 137 162 public function test_is8601_to_datetime_correct_time( $timezone_string, $gmt_offset ) { -
trunk/tests/phpunit/tests/formatting/emoji.php
r53150 r53562 12 12 /** 13 13 * @ticket 36525 14 * 15 * @covers ::_print_emoji_detection_script 14 16 */ 15 17 public function test_unfiltered_emoji_cdns() { … … 28 30 /** 29 31 * @ticket 36525 32 * 33 * @covers ::_print_emoji_detection_script 30 34 */ 31 35 public function test_filtered_emoji_svn_cdn() { … … 51 55 /** 52 56 * @ticket 36525 57 * 58 * @covers ::_print_emoji_detection_script 53 59 */ 54 60 public function test_filtered_emoji_png_cdn() { … … 70 76 /** 71 77 * @ticket 41501 78 * 79 * @covers ::_wp_emoji_list 72 80 */ 73 81 public function test_wp_emoji_list_returns_data() { … … 114 122 * @ticket 35293 115 123 * @dataProvider data_wp_encode_emoji 124 * 125 * @covers ::wp_encode_emoji 116 126 */ 117 127 public function test_wp_encode_emoji( $emoji, $expected ) { … … 149 159 * @ticket 35293 150 160 * @dataProvider data_wp_staticize_emoji 161 * 162 * @covers ::wp_staticize_emoji 151 163 */ 152 164 public function test_wp_staticize_emoji( $emoji, $expected ) { -
trunk/tests/phpunit/tests/formatting/ent2ncr.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::ent2ncr 5 7 */ 6 8 class Tests_Formatting_Ent2ncr extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/escAttr.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::esc_attr 5 7 */ 6 8 class Tests_Formatting_EscAttr extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/escHtml.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::esc_html 5 7 */ 6 8 class Tests_Formatting_EscHtml extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/escJs.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::esc_js 5 7 */ 6 8 class Tests_Formatting_EscJs extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/escTextarea.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::esc_textarea 5 7 */ 6 8 class Tests_Formatting_EscTextarea extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/escUrl.php
r53455 r53562 8 8 /** 9 9 * @ticket 23605 10 * 11 * @covers ::esc_url 10 12 */ 11 13 public function test_spaces() { … … 20 22 } 21 23 24 /** 25 * @covers ::esc_url 26 */ 22 27 public function test_bad_characters() { 23 28 $this->assertSame( 'http://example.com/watchthelinefeedgo', esc_url( 'http://example.com/watchthelinefeed%0Ago' ) ); … … 34 39 } 35 40 41 /** 42 * @covers ::esc_url 43 */ 36 44 public function test_relative() { 37 45 $this->assertSame( '/example.php', esc_url( '/example.php' ) ); … … 41 49 } 42 50 51 /** 52 * @covers ::esc_url 53 * @covers ::esc_url_raw 54 */ 43 55 public function test_all_url_parts() { 44 56 $url = 'https://user:pass@host.example.com:1234/path;p=1?query=2&r[]=3#fragment'; … … 57 69 parse_url( $url ) 58 70 ); 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 ) ); 60 72 $this->assertSame( 'https://user:pass@host.example.com:1234/path;p=1?query=2&r%5B%5D=3#fragment', esc_url( $url ) ); 61 73 } 62 74 75 /** 76 * @covers ::esc_url 77 */ 63 78 public function test_bare() { 64 79 $this->assertSame( 'http://example.com?foo', esc_url( 'example.com?foo' ) ); … … 69 84 } 70 85 86 /** 87 * @covers ::esc_url 88 * @covers ::esc_url_raw 89 */ 71 90 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&bar=2', sanitize_url( 'http://example.com?foo=1&bar=2' ) );74 $this->assertSame( 'http://example.com?foo=1&bar=2', sanitize_url( 'http://example.com?foo=1&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&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); 93 $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url_raw( 'http://example.com?foo=1&bar=2' ) ); 75 94 76 95 $this->assertSame( 'http://example.com?foo=1&bar=2', esc_url( 'http://example.com?foo=1&bar=2' ) ); … … 82 101 } 83 102 103 /** 104 * @covers ::esc_url 105 * @covers ::wp_allowed_protocols 106 */ 84 107 public function test_protocol() { 85 108 $this->assertSame( 'http://example.com', esc_url( 'http://example.com' ) ); … … 146 169 /** 147 170 * @ticket 23187 171 * 172 * @covers ::esc_url 148 173 */ 149 174 public function test_protocol_case() { … … 152 177 } 153 178 179 /** 180 * @covers ::esc_url 181 */ 154 182 public function test_display_extras() { 155 183 $this->assertSame( 'http://example.com/'quoted'', esc_url( 'http://example.com/\'quoted\'' ) ); … … 157 185 } 158 186 187 /** 188 * @covers ::esc_url 189 */ 159 190 public function test_non_ascii() { 160 191 $this->assertSame( 'http://example.org/баба', esc_url( 'http://example.org/баба' ) ); … … 163 194 } 164 195 196 /** 197 * @covers ::esc_url 198 */ 165 199 public function test_feed() { 166 200 $this->assertSame( '', esc_url( 'feed:javascript:alert(1)' ) ); … … 173 207 /** 174 208 * @ticket 16859 209 * 210 * @covers ::esc_url 175 211 */ 176 212 public function test_square_brackets() { … … 188 224 /** 189 225 * Courtesy of http://blog.lunatech.com/2009/02/03/what-every-web-developer-must-know-about-url-encoding 226 * 227 * @covers ::esc_url_raw 190 228 */ 191 229 public function test_reserved_characters() { 192 230 $url = "http://example.com/:@-._~!$&'()*+,=;:@-._~!$&'()*+,=:@-._~!$&'()*+,==?/?:@-._~!$%27()*+,;=/?:@-._~!$%27()*+,;==#/?:@-._~!$&'()*+,;="; 193 $this->assertSame( $url, sanitize_url( $url ) );231 $this->assertSame( $url, esc_url_raw( $url ) ); 194 232 } 195 233 196 234 /** 197 235 * @ticket 21974 236 * 237 * @covers ::esc_url 198 238 */ 199 239 public function test_protocol_relative_with_colon() { … … 203 243 /** 204 244 * @ticket 31632 245 * 246 * @covers ::esc_url 205 247 */ 206 248 public function test_mailto_with_newline() { … … 218 260 /** 219 261 * @ticket 31632 262 * 263 * @covers ::esc_url 220 264 */ 221 265 public function test_mailto_in_http_url_with_newline() { … … 233 277 /** 234 278 * @ticket 23605 279 * 280 * @covers ::esc_url 235 281 */ 236 282 public function test_mailto_with_spaces() { … … 244 290 /** 245 291 * @ticket 28015 292 * 293 * @covers ::esc_url_raw 246 294 */ 247 295 public function test_invalid_charaters() { 248 $this->assertEmpty( sanitize_url( '"^<>{}`' ) );296 $this->assertEmpty( esc_url_raw( '"^<>{}`' ) ); 249 297 } 250 298 251 299 /** 252 300 * @ticket 34202 301 * 302 * @covers ::esc_url 253 303 */ 254 304 public function test_ipv6_hosts() { -
trunk/tests/phpunit/tests/formatting/escXml.php
r53144 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::esc_xml 5 7 */ 6 8 class Tests_Formatting_EscXml extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/excerptRemoveBlocks.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * @covers ::excerpt_remove_blocks6 5 * @ticket 46133 7 6 */ … … 92 91 * 93 92 * @ticket 46133 93 * 94 * @covers ::excerpt_remove_blocks 94 95 */ 95 96 public function test_excerpt_remove_blocks() { … … 117 118 * 118 119 * @ticket 46133 120 * 121 * @covers ::do_blocks 119 122 */ 120 123 public function test_excerpt_infinite_loop() { -
trunk/tests/phpunit/tests/formatting/getBloginfo.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::get_bloginfo 5 7 */ 6 8 class Tests_Formatting_GetBloginfo extends WP_UnitTestCase { … … 36 38 /** 37 39 * @ticket 27942 40 * @covers ::sanitize_option 38 41 */ 39 42 public function test_bloginfo_sanitize_option() { -
trunk/tests/phpunit/tests/formatting/getUrlInContent.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::get_url_in_content 5 7 */ 6 8 class Tests_Formatting_GetUrlInContent extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/humanTimeDiff.php
r52010 r53562 4 4 * @group formatting 5 5 * @ticket 38773 6 * 7 * @covers ::human_time_diff 6 8 */ 7 9 class Tests_Formatting_HumanTimeDiff extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/isEmail.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::is_email 5 7 */ 6 8 class Tests_Formatting_IsEmail extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/likeEscape.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::like_escape 5 7 */ 6 8 class Tests_Formatting_LikeEscape extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/linksAddTarget.php
r52010 r53562 2 2 /** 3 3 * @group formatting 4 * 5 * @covers ::links_add_target 4 6 */ 5 7 class Tests_Formatting_LinksAddTarget extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/makeClickable.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::make_clickable 5 7 */ 6 8 class Tests_Formatting_MakeClickable extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/mapDeep.php
r51623 r53562 4 4 * @group formatting 5 5 * @ticket 22300 6 * 7 * @covers ::map_deep 6 8 */ 7 9 class Tests_Formatting_MapDeep extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/normalizeWhitespace.php
r52010 r53562 2 2 /** 3 3 * @group formatting 4 * 5 * @covers ::normalize_whitespace 4 6 */ 5 7 class Tests_Formatting_NormalizeWhitespace extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/redirect.php
r52010 r53562 23 23 * @param string $location The path or URL to redirect to. 24 24 * @param int $status HTTP response status code to use. 25 * 26 * @covers ::wp_redirect 25 27 */ 26 28 public function test_wp_redirect_bad_status_code( $location, $status ) { … … 42 44 } 43 45 46 /** 47 * @covers ::wp_sanitize_redirect 48 */ 44 49 public function test_wp_sanitize_redirect() { 45 50 $this->assertSame( 'http://example.com/watchthelinefeedgo', wp_sanitize_redirect( 'http://example.com/watchthelinefeed%0Ago' ) ); … … 60 65 /** 61 66 * @ticket 36998 67 * 68 * @covers ::wp_sanitize_redirect 62 69 */ 63 70 public function test_wp_sanitize_redirect_should_encode_spaces() { … … 68 75 /** 69 76 * @dataProvider valid_url_provider 77 * 78 * @covers ::wp_validate_redirect 70 79 */ 71 80 public function test_wp_validate_redirect_valid_url( $url, $expected ) { … … 75 84 /** 76 85 * @dataProvider invalid_url_provider 86 * 87 * @covers ::wp_validate_redirect 77 88 */ 78 89 public function test_wp_validate_redirect_invalid_url( $url ) { … … 167 178 * @ticket 47980 168 179 * @dataProvider relative_url_provider 180 * 181 * @covers ::wp_validate_redirect 169 182 */ 170 183 public function test_wp_validate_redirect_relative_url( $current_uri, $url, $expected ) { -
trunk/tests/phpunit/tests/formatting/removeAccents.php
r52809 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::remove_accents 5 7 */ 6 8 class Tests_Formatting_RemoveAccents extends WP_UnitTestCase { 9 7 10 public function test_remove_accents_simple() { 8 11 $this->assertSame( 'abcdefghijkl', remove_accents( 'abcdefghijkl' ) ); -
trunk/tests/phpunit/tests/formatting/sanitizeFileName.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::sanitize_file_name 5 7 */ 6 8 class Tests_Formatting_SanitizeFileName extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/sanitizeMimeType.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::sanitize_mime_type 5 7 */ 6 8 class Tests_Formatting_SanitizeMimeType extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/sanitizeOrderby.php
r52010 r53562 3 3 /** 4 4 * @group sanitize_sql_orderby 5 * 6 * @covers ::sanitize_sql_orderby 5 7 */ 6 8 class Tests_Formatting_SanitizeOrderby extends WP_UnitTestCase { 7 9 8 10 /** 9 * @covers ::sanitize_sql_orderby10 11 * @dataProvider valid_orderbys 11 12 */ … … 34 35 35 36 /** 36 * @covers ::sanitize_sql_orderby37 37 * @dataProvider invalid_orderbys 38 38 */ -
trunk/tests/phpunit/tests/formatting/sanitizePost.php
r52010 r53562 3 3 * @group formatting 4 4 * @group post 5 * 6 * @covers WP_Post::__construct 5 7 */ 6 8 class Tests_Formatting_SanitizePost extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/sanitizeTextField.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::sanitize_text_field 7 * @covers ::sanitize_textarea_field 5 8 */ 6 9 class Tests_Formatting_SanitizeTextField extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/sanitizeTitle.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::sanitize_title 5 7 */ 6 8 class Tests_Formatting_SanitizeTitle extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/sanitizeTitleWithDashes.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::sanitize_title_with_dashes 5 7 */ 6 8 class Tests_Formatting_SanitizeTitleWithDashes extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/sanitizeTrackbackUrls.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::sanitize_trackback_urls 5 7 */ 6 8 class Tests_Formatting_SanitizeTrackbackUrls extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/sanitizeUser.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::sanitize_user 5 7 */ 6 8 class Tests_Formatting_SanitizeUser extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/seemsUtf8.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::seems_utf8 5 7 */ 6 8 class Tests_Formatting_SeemsUtf8 extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/slashit.php
r52010 r53562 5 5 */ 6 6 class Tests_Formatting_Slashit extends WP_UnitTestCase { 7 8 /** 9 * @covers ::backslashit 10 */ 7 11 public function test_backslashes_middle_numbers() { 8 12 $this->assertSame( "\\a-!9\\a943\\b\\c", backslashit( 'a-!9a943bc' ) ); 9 13 } 10 14 15 /** 16 * @covers ::backslashit 17 */ 11 18 public function test_backslashes_alphas() { 12 19 $this->assertSame( "\\a943\\b\\c", backslashit( 'a943bc' ) ); 13 20 } 14 21 22 /** 23 * @covers ::backslashit 24 */ 15 25 public function test_double_backslashes_leading_numbers() { 16 26 $this->assertSame( '\\\\95', backslashit( '95' ) ); 17 27 } 18 28 29 /** 30 * @covers ::untrailingslashit 31 */ 19 32 public function test_removes_trailing_slashes() { 20 33 $this->assertSame( 'a', untrailingslashit( 'a/' ) ); … … 24 37 /** 25 38 * @ticket 22267 39 * 40 * @covers ::untrailingslashit 26 41 */ 27 42 public function test_removes_trailing_backslashes() { … … 32 47 /** 33 48 * @ticket 22267 49 * 50 * @covers ::untrailingslashit 34 51 */ 35 52 public function test_removes_trailing_mixed_slashes() { … … 38 55 } 39 56 57 /** 58 * @covers ::trailingslashit 59 */ 40 60 public function test_adds_trailing_slash() { 41 61 $this->assertSame( 'a/', trailingslashit( 'a' ) ); 42 62 } 43 63 64 /** 65 * @covers ::trailingslashit 66 */ 44 67 public function test_does_not_add_trailing_slash_if_one_exists() { 45 68 $this->assertSame( 'a/', trailingslashit( 'a/' ) ); … … 48 71 /** 49 72 * @ticket 22267 73 * 74 * @covers ::trailingslashit 50 75 */ 51 76 public function test_converts_trailing_backslash_to_slash_if_one_exists() { -
trunk/tests/phpunit/tests/formatting/stripslashesDeep.php
r52010 r53562 4 4 * @group formatting 5 5 * @group slashes 6 * 7 * @covers ::stripslashes_deep 6 8 */ 7 9 class Tests_Formatting_StripslashesDeep extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/urlShorten.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::url_shorten 5 7 */ 6 8 class Tests_Formatting_UrlShorten extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/urlencodeDeep.php
r51623 r53562 4 4 * @group formatting 5 5 * @ticket 22300 6 * 7 * @covers ::urlencode_deep 6 8 */ 7 9 class Tests_Formatting_UrlencodeDeep extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/utf8UriEncode.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::utf8_uri_encode 5 7 */ 6 8 class Tests_Formatting_Utf8UriEncode extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpAutop.php
r52789 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wpautop 5 7 */ 6 8 class Tests_Formatting_wpAutop extends WP_UnitTestCase { … … 542 544 * wpautop() should not add extra </p> before <figcaption> 543 545 * 544 * @covers ::wpautop 546 * @ticket 39307 547 * 545 548 * @uses ::trim 546 *547 * @ticket 39307548 549 */ 549 550 public function test_that_wpautop_does_not_add_extra_closing_p_in_figure() { -
trunk/tests/phpunit/tests/formatting/wpBasename.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 6 * @covers ::wp_basename 5 7 */ 6 8 class Tests_Formatting_wpBasename extends WP_UnitTestCase { … … 39 41 ); 40 42 } 41 42 43 } -
trunk/tests/phpunit/tests/formatting/wpHtmlExcerpt.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wp_html_excerpt 5 7 */ 6 8 class Tests_Formatting_wpHtmlExcerpt extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpHtmlSplit.php
r52010 r53562 10 10 * 11 11 * @dataProvider data_basic_features 12 * 13 * @covers ::wp_html_split 12 14 */ 13 15 public function test_basic_features( $input, $output ) { … … 40 42 * 41 43 * @dataProvider data_whole_posts 44 * 45 * @covers ::preg_split 42 46 */ 43 47 public function test_pcre_performance( $input ) { -
trunk/tests/phpunit/tests/formatting/wpHtmleditPre.php
r52010 r53562 4 4 * @group formatting 5 5 * @expectedDeprecated wp_htmledit_pre 6 * 7 * @covers ::wp_htmledit_pre 6 8 */ 7 9 class Tests_Formatting_wpHtmleditPre extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpIsoDescrambler.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wp_iso_descrambler 5 7 */ 6 8 class Tests_Formatting_wpIsoDescrambler extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpMakeLinkRelative.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wp_make_link_relative 5 7 */ 6 8 class Tests_Formatting_wpMakeLinkRelative extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpRelNofollow.php
r51968 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wp_rel_nofollow 5 7 */ 6 8 class Tests_Formatting_wpRelNofollow extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpRelUgc.php
r51968 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wp_rel_ugc 5 7 */ 6 8 class Tests_Formatting_wpRelUgc extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpReplaceInHtmlTags.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wp_replace_in_html_tags 5 7 */ 6 8 class Tests_Formatting_wpReplaceInHtmlTags extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpRicheditPre.php
r52010 r53562 4 4 * @group formatting 5 5 * @expectedDeprecated wp_richedit_pre 6 * 7 * @covers ::wp_richedit_pre 6 8 */ 7 9 class Tests_Formatting_wpRicheditPre extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpSlash.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wp_slash 5 7 */ 6 8 class Tests_Formatting_wpSlash extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpSpecialchars.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::_wp_specialchars 5 7 */ 6 8 class Tests_Formatting_wpSpecialchars extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpStripAllTags.php
r52010 r53562 4 4 * 5 5 * @group formatting 6 * 7 * @covers ::wp_strip_all_tags 6 8 */ 7 9 class Tests_Formatting_wpStripAllTags extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpTargetedLinkRel.php
r51623 r53562 4 4 * @group formatting 5 5 * @ticket 43187 6 * 7 * @covers ::wp_targeted_link_rel 6 8 */ 7 9 class Tests_Formatting_wpTargetedLinkRel extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/wpTexturize.php
r52010 r53562 5 5 */ 6 6 class Tests_Formatting_wpTexturize extends WP_UnitTestCase { 7 8 /** 9 * @covers ::wptexturize 10 */ 7 11 public function test_dashes() { 8 12 $this->assertSame( 'Hey — boo?', wptexturize( 'Hey -- boo?' ) ); … … 10 14 } 11 15 16 /** 17 * @covers ::wptexturize 18 */ 12 19 public function test_disable() { 13 20 $this->assertSame( '<pre>---&</pre>', wptexturize( '<pre>---&</pre>' ) ); … … 35 42 /** 36 43 * @ticket 1418 44 * 45 * @covers ::wptexturize 37 46 */ 38 47 public function test_bracketed_quotes_1418() { … … 44 53 /** 45 54 * @ticket 3810 55 * 56 * @covers ::wptexturize 46 57 */ 47 58 public function test_bracketed_quotes_3810() { … … 51 62 /** 52 63 * @ticket 4539 64 * 65 * @covers ::wptexturize 53 66 */ 54 67 public function test_basic_quotes() { … … 74 87 * @ticket 4539 75 88 * @ticket 15241 89 * 90 * @covers ::wptexturize 76 91 */ 77 92 public function test_full_sentences_with_unmatched_single_quotes() { … … 84 99 /** 85 100 * @ticket 4539 101 * 102 * @covers ::wptexturize 86 103 */ 87 104 public function test_quotes() { … … 103 120 /** 104 121 * @ticket 4539 122 * 123 * @covers ::wptexturize 105 124 */ 106 125 public function test_quotes_before_s() { … … 114 133 /** 115 134 * @ticket 4539 135 * 136 * @covers ::wptexturize 116 137 */ 117 138 public function test_quotes_before_numbers() { … … 142 163 } 143 164 165 /** 166 * @covers ::wptexturize 167 */ 144 168 public function test_quotes_after_numbers() { 145 169 $this->assertSame( 'Class of ’99', wptexturize( "Class of '99" ) ); … … 149 173 * @ticket 4539 150 174 * @ticket 15241 175 * 176 * @covers ::wptexturize 151 177 */ 152 178 public function test_other_html() { … … 156 182 } 157 183 184 /** 185 * @covers ::wptexturize 186 */ 158 187 public function test_x() { 159 188 $this->assertSame( '14×24', wptexturize( '14x24' ) ); 160 189 } 161 190 191 /** 192 * @covers ::wptexturize 193 */ 162 194 public function test_minutes_seconds() { 163 195 $this->assertSame( '9′', wptexturize( '9\'' ) ); … … 173 205 /** 174 206 * @ticket 8775 207 * 208 * @covers ::wptexturize 175 209 */ 176 210 public function test_wptexturize_quotes_around_numbers() { … … 183 217 /** 184 218 * @ticket 8912 219 * 220 * @covers ::wptexturize 185 221 */ 186 222 public function test_wptexturize_html_comments() { … … 193 229 * @ticket 4539 194 230 * @ticket 15241 231 * 232 * @covers ::wptexturize 195 233 */ 196 234 public function test_entity_quote_cuddling() { … … 201 239 /** 202 240 * @ticket 22823 241 * 242 * @covers ::wptexturize 203 243 */ 204 244 public function test_apostrophes_before_primes() { … … 208 248 /** 209 249 * @ticket 23185 250 * 251 * @covers ::wptexturize 210 252 */ 211 253 public function test_spaces_around_hyphens() { … … 231 273 /** 232 274 * @ticket 31030 275 * 276 * @covers ::wptexturize 233 277 */ 234 278 public function test_hyphens_at_start_and_end() { … … 248 292 * 249 293 * @ticket 22692 294 * 295 * @covers ::wptexturize 250 296 */ 251 297 public function test_spaces_around_quotes_never() { … … 265 311 * @ticket 22692 266 312 * @dataProvider data_spaces_around_quotes 313 * 314 * @covers ::wptexturize 267 315 */ 268 316 public function test_spaces_around_quotes( $input, $output ) { 269 return$this->assertSame( $output, wptexturize( $input ) );317 $this->assertSame( $output, wptexturize( $input ) ); 270 318 } 271 319 … … 321 369 * @ticket 22692 322 370 * @dataProvider data_apos_before_digits 371 * 372 * @covers ::wptexturize 323 373 */ 324 374 public function test_apos_before_digits( $input, $output ) { 325 return$this->assertSame( $output, wptexturize( $input ) );375 $this->assertSame( $output, wptexturize( $input ) ); 326 376 } 327 377 … … 362 412 * @ticket 22692 363 413 * @dataProvider data_opening_single_quote 414 * 415 * @covers ::wptexturize 364 416 */ 365 417 public function test_opening_single_quote( $input, $output ) { 366 return$this->assertSame( $output, wptexturize( $input ) );418 $this->assertSame( $output, wptexturize( $input ) ); 367 419 } 368 420 … … 491 543 * @ticket 22692 492 544 * @dataProvider data_double_prime 545 * 546 * @covers ::wptexturize 493 547 */ 494 548 public function test_double_prime( $input, $output ) { 495 return$this->assertSame( $output, wptexturize( $input ) );549 $this->assertSame( $output, wptexturize( $input ) ); 496 550 } 497 551 … … 524 578 * @ticket 22692 525 579 * @dataProvider data_single_prime 580 * 581 * @covers ::wptexturize 526 582 */ 527 583 public function test_single_prime( $input, $output ) { 528 return$this->assertSame( $output, wptexturize( $input ) );584 $this->assertSame( $output, wptexturize( $input ) ); 529 585 } 530 586 … … 557 613 * @ticket 22692 558 614 * @dataProvider data_contractions 615 * 616 * @covers ::wptexturize 559 617 */ 560 618 public function test_contractions( $input, $output ) { 561 return$this->assertSame( $output, wptexturize( $input ) );619 $this->assertSame( $output, wptexturize( $input ) ); 562 620 } 563 621 … … 598 656 * @ticket 22692 599 657 * @dataProvider data_opening_quote 658 * 659 * @covers ::wptexturize 600 660 */ 601 661 public function test_opening_quote( $input, $output ) { 602 return$this->assertSame( $output, wptexturize( $input ) );662 $this->assertSame( $output, wptexturize( $input ) ); 603 663 } 604 664 … … 675 735 * @ticket 22692 676 736 * @dataProvider data_closing_quote 737 * 738 * @covers ::wptexturize 677 739 */ 678 740 public function test_closing_quote( $input, $output ) { 679 return$this->assertSame( $output, wptexturize( $input ) );741 $this->assertSame( $output, wptexturize( $input ) ); 680 742 } 681 743 … … 764 826 * @ticket 22692 765 827 * @dataProvider data_closing_single_quote 828 * 829 * @covers ::wptexturize 766 830 */ 767 831 public function test_closing_single_quote( $input, $output ) { 768 return$this->assertSame( $output, wptexturize( $input ) );832 $this->assertSame( $output, wptexturize( $input ) ); 769 833 } 770 834 … … 854 918 * @ticket 30445 855 919 * @dataProvider data_multiplication 920 * 921 * @covers ::wptexturize 856 922 */ 857 923 public function test_multiplication( $input, $output ) { 858 return$this->assertSame( $output, wptexturize( $input ) );924 $this->assertSame( $output, wptexturize( $input ) ); 859 925 } 860 926 … … 904 970 * @ticket 22692 905 971 * @dataProvider data_ampersand 972 * 973 * @covers ::wptexturize 906 974 */ 907 975 public function test_ampersand( $input, $output ) { 908 return$this->assertSame( $output, wptexturize( $input ) );976 $this->assertSame( $output, wptexturize( $input ) ); 909 977 } 910 978 … … 969 1037 * @ticket 22692 970 1038 * @dataProvider data_cockney 1039 * 1040 * @covers ::wptexturize 971 1041 */ 972 1042 public function test_cockney( $input, $output ) { 973 return$this->assertSame( $output, wptexturize( $input ) );1043 $this->assertSame( $output, wptexturize( $input ) ); 974 1044 } 975 1045 … … 1030 1100 * @ticket 22692 1031 1101 * @dataProvider data_smart_dashes 1102 * 1103 * @covers ::wptexturize 1032 1104 */ 1033 1105 public function test_smart_dashes( $input, $output ) { 1034 return$this->assertSame( $output, wptexturize( $input ) );1106 $this->assertSame( $output, wptexturize( $input ) ); 1035 1107 } 1036 1108 … … 1083 1155 * @ticket 22692 1084 1156 * @dataProvider data_misc_static_replacements 1157 * 1158 * @covers ::wptexturize 1085 1159 */ 1086 1160 public function test_misc_static_replacements( $input, $output ) { 1087 return$this->assertSame( $output, wptexturize( $input ) );1161 $this->assertSame( $output, wptexturize( $input ) ); 1088 1162 } 1089 1163 … … 1138 1212 * @ticket 8775 1139 1213 * @dataProvider data_quoted_numbers 1214 * 1215 * @covers ::wptexturize 1140 1216 */ 1141 1217 public function test_quoted_numbers( $input, $output ) { 1142 return$this->assertSame( $output, wptexturize( $input ) );1218 $this->assertSame( $output, wptexturize( $input ) ); 1143 1219 } 1144 1220 … … 1189 1265 * @ticket 20342 1190 1266 * @dataProvider data_quotes_and_dashes 1267 * 1268 * @covers ::wptexturize 1191 1269 */ 1192 1270 public function test_quotes_and_dashes( $input, $output ) { 1193 return$this->assertSame( $output, wptexturize( $input ) );1271 $this->assertSame( $output, wptexturize( $input ) ); 1194 1272 } 1195 1273 … … 1252 1330 * @ticket 12690 1253 1331 * @dataProvider data_tag_avoidance 1332 * 1333 * @covers ::wptexturize 1254 1334 */ 1255 1335 public function test_tag_avoidance( $input, $output ) { 1256 return$this->assertSame( $output, wptexturize( $input ) );1336 $this->assertSame( $output, wptexturize( $input ) ); 1257 1337 } 1258 1338 … … 1475 1555 * @ticket 26850 1476 1556 * @dataProvider data_year_abbr 1557 * 1558 * @covers ::wptexturize 1477 1559 */ 1478 1560 public function test_year_abbr( $input, $output ) { 1479 return$this->assertSame( $output, wptexturize( $input ) );1561 $this->assertSame( $output, wptexturize( $input ) ); 1480 1562 } 1481 1563 … … 1564 1646 * @ticket 27426 1565 1647 * @dataProvider data_translate 1648 * 1649 * @covers ::wptexturize 1566 1650 */ 1567 1651 public function test_translate( $input, $output ) { … … 1573 1657 wptexturize( 'reset', true ); 1574 1658 1575 return$this->assertSame( $output, $result );1659 $this->assertSame( $output, $result ); 1576 1660 } 1577 1661 … … 1791 1875 * @ticket 28483 1792 1876 * @dataProvider data_element_stack 1877 * 1878 * @covers ::wptexturize 1793 1879 */ 1794 1880 public function test_element_stack( $input, $output ) { 1795 return$this->assertSame( $output, wptexturize( $input ) );1881 $this->assertSame( $output, wptexturize( $input ) ); 1796 1882 } 1797 1883 … … 1842 1928 * @ticket 29557 1843 1929 * @dataProvider data_unregistered_shortcodes 1930 * 1931 * @covers ::wptexturize 1844 1932 */ 1845 1933 public function test_unregistered_shortcodes( $input, $output ) { … … 1927 2015 * @ticket 29256 1928 2016 * @dataProvider data_primes_vs_quotes 2017 * 2018 * @covers ::wptexturize 1929 2019 */ 1930 2020 public function test_primes_vs_quotes( $input, $output ) { 1931 return$this->assertSame( $output, wptexturize( $input ) );2021 $this->assertSame( $output, wptexturize( $input ) ); 1932 2022 } 1933 2023 … … 1989 2079 * @ticket 29256 1990 2080 * @dataProvider data_primes_quotes_translation 2081 * 2082 * @covers ::wptexturize 1991 2083 */ 1992 2084 public function test_primes_quotes_translation( $input, $output ) { … … 1998 2090 wptexturize( 'reset', true ); 1999 2091 2000 return$this->assertSame( $output, $result );2092 $this->assertSame( $output, $result ); 2001 2093 } 2002 2094 … … 2082 2174 * 2083 2175 * @dataProvider data_whole_posts 2176 * 2177 * @covers ::preg_split 2084 2178 */ 2085 2179 public function test_pcre_performance( $input ) { … … 2102 2196 * 2103 2197 * @ticket 35864 2198 * 2199 * @covers ::wptexturize 2104 2200 */ 2105 2201 public function test_trailing_less_than() { -
trunk/tests/phpunit/tests/formatting/wpTrimExcerpt.php
r51968 r53562 3 3 /** 4 4 * @group formatting 5 * 5 6 * @covers ::wp_trim_excerpt 6 7 */ -
trunk/tests/phpunit/tests/formatting/wpTrimWords.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::wp_trim_words 5 7 */ 6 8 class Tests_Formatting_wpTrimWords extends WP_UnitTestCase { -
trunk/tests/phpunit/tests/formatting/zeroise.php
r52010 r53562 3 3 /** 4 4 * @group formatting 5 * 6 * @covers ::zeroise 5 7 */ 6 8 class Tests_Formatting_Zeroise extends WP_UnitTestCase {
Note: See TracChangeset
for help on using the changeset viewer.