Changeset 903 in tests for trunk/tests/test_includes_formatting.php
- Timestamp:
- 07/16/2012 05:24:25 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/test_includes_formatting.php
r894 r903 170 170 'In his famous speech “You and Your research” (here: 171 171 http://www.cs.virginia.edu/~robins/YouAndYourResearch.html) 172 Richard Hamming wrote about people getting more done with their doors closed, but', 172 Richard Hamming wrote about people getting more done with their doors closed, but', 173 173 ); 174 174 $urls_expected = array( … … 184 184 'In his famous speech “You and Your research” (here: 185 185 <a href="http://www.cs.virginia.edu/~robins/YouAndYourResearch.html" rel="nofollow">http://www.cs.virginia.edu/~robins/YouAndYourResearch.html</a>) 186 Richard Hamming wrote about people getting more done with their doors closed, but', 186 Richard Hamming wrote about people getting more done with their doors closed, but', 187 187 ); 188 188 foreach ($urls_before as $key => $url) { … … 754 754 * 755 755 * @ticket 19855 756 */ 756 */ 757 757 public function test_skip_pre_elements() { 758 758 $code = file_get_contents( DIR_TESTDATA . '/formatting/sizzle.js' ); 759 759 $code = str_replace( "\r", '', $code ); 760 760 $code = htmlentities( $code ); 761 761 762 762 // Not wrapped in <p> tags 763 763 $str = "<pre>$code</pre>"; … … 766 766 // Text before/after is wrapped in <p> tags 767 767 $str = "Look at this code\n\n<pre>$code</pre>\n\nIsn't that cool?"; 768 768 769 769 // Expected text after wpautop 770 770 $expected = '<p>Look at this code</p>' . "\n<pre>" . $code . "</pre>\n" . '<p>Isn\'t that cool?</p>'; … … 776 776 $this->assertEquals( $expected, trim( wpautop( $str ) ) ); 777 777 } 778 778 779 779 /** 780 780 * wpautop() Should not add <br/> to "<input>" elements 781 781 * 782 782 * @ticket 16456 783 */ 783 */ 784 784 public function test_skip_input_elements() { 785 785 $str = 'Username: <input type="text" id="username" name="username" /><br />Password: <input type="password" id="password1" name="password1" />'; … … 1458 1458 1459 1459 $text = 'This text contains<style>#css { width:expression(alert("css")) }</style>. It should go.'; 1460 $this->assertEquals( $trimmed, wp_trim_words( $text ) ); 1460 $this->assertEquals( $trimmed, wp_trim_words( $text ) ); 1461 1461 } 1462 1462 … … 1526 1526 // acute accent 1527 1527 $this->assertEquals( 'AaAaEeOoOoUu', remove_accents( 'ẤấẮắẾếỐốỚớỨứ' ) ); 1528 // dot below 1528 // dot below 1529 1529 $this->assertEquals( 'AaAaAaEeEeIiOoOoOoUuUuYy', remove_accents( 'ẠạẬậẶặẸẹỆệỊịỌọỘộỢợỤụỰựỴỵ' ) ); 1530 1530 }
Note: See TracChangeset
for help on using the changeset viewer.