@@ 273-300 (lines=28) @@ | ||
270 | $this->assertContains( $expected, get_echo( 'wp_print_styles' ) ); |
|
271 | } |
|
272 | ||
273 | function data_styles_with_media() { |
|
274 | return array( |
|
275 | array( |
|
276 | "media='all'", |
|
277 | 'all' |
|
278 | ), |
|
279 | array( |
|
280 | "media='(orientation: portrait)'", |
|
281 | '(orientation: portrait)' |
|
282 | ), |
|
283 | array( |
|
284 | "media='(max-width: 640px)'", |
|
285 | '(max-width: 640px)' |
|
286 | ), |
|
287 | array( |
|
288 | "media='print and (min-width: 25cm)'", |
|
289 | 'print and (min-width: 25cm)' |
|
290 | ), |
|
291 | array( |
|
292 | "media='screen and (color), projection and (color)'", |
|
293 | 'screen and (color), projection and (color)' |
|
294 | ), |
|
295 | array( |
|
296 | "media='not screen and (color)'", |
|
297 | 'not screen and (color)' |
|
298 | ), |
|
299 | ); |
|
300 | } |
|
301 | } |
|
302 |
@@ 321-348 (lines=28) @@ | ||
318 | return $this->assertEquals( $output, wptexturize( $input ) ); |
|
319 | } |
|
320 | ||
321 | function data_apos_before_digits() { |
|
322 | return array( |
|
323 | array( |
|
324 | "word '99 word", |
|
325 | "word ’99 word", |
|
326 | ), |
|
327 | array( |
|
328 | "word'99 word", |
|
329 | "word’99 word", |
|
330 | ), |
|
331 | array( |
|
332 | "word '99word", |
|
333 | "word ’99word", |
|
334 | ), |
|
335 | array( |
|
336 | "word'99word", |
|
337 | "word’99word", |
|
338 | ), |
|
339 | array( |
|
340 | "word '99’s word", // Appears as a separate but logically superfluous pattern in 3.8. |
|
341 | "word ’99’s word", |
|
342 | ), |
|
343 | array( |
|
344 | "according to our source, '33 students scored less than 50' on the test.", // Apostrophes and primes have priority over quotes |
|
345 | "according to our source, ’33 students scored less than 50′ on the test.", |
|
346 | ), |
|
347 | ); |
|
348 | } |
|
349 | ||
350 | /** |
|
351 | * Apostrophe after a space or ([{<" becomes ‘ (opening_single_quote) |
|
@@ 557-584 (lines=28) @@ | ||
554 | return $this->assertEquals( $output, wptexturize( $input ) ); |
|
555 | } |
|
556 | ||
557 | function data_contractions() { |
|
558 | return array( |
|
559 | array( |
|
560 | "word word's word", |
|
561 | "word word’s word", |
|
562 | ), |
|
563 | array( |
|
564 | "word'[ word", // Apostrophes are never followed by opening punctuation. |
|
565 | "word'[ word", |
|
566 | ), |
|
567 | array( |
|
568 | "word'( word", |
|
569 | "word'( word", |
|
570 | ), |
|
571 | array( |
|
572 | "word'{ word", |
|
573 | "word'{ word", |
|
574 | ), |
|
575 | array( |
|
576 | "word'< word", |
|
577 | "word'< word", |
|
578 | ), |
|
579 | array( |
|
580 | "word'< word", // Invalid HTML input does trigger the apos pattern. |
|
581 | "word’< word", |
|
582 | ), |
|
583 | ); |
|
584 | } |
|
585 | ||
586 | /** |
|
587 | * Double quote after a space or ([-{< becomes “ (opening_quote) if not followed by spaces |
@@ 28-37 (lines=10) @@ | ||
25 | $wp_rewrite = $this->wp_rewrite; |
|
26 | } |
|
27 | ||
28 | public function _invalid_rewrite_tags() { |
|
29 | return array( |
|
30 | array( 'foo', 'bar' ), |
|
31 | array( '%', 'bar' ), |
|
32 | array( '%a', 'bar' ), |
|
33 | array( 'a%', 'bar' ), |
|
34 | array( '%%', 'bar' ), |
|
35 | array( '', 'bar' ), |
|
36 | ); |
|
37 | } |
|
38 | ||
39 | /** |
|
40 | * @dataProvider _invalid_rewrite_tags |