Changeset 52010 for trunk/tests/phpunit/tests/formatting/wpAutop.php
- Timestamp:
- 11/04/2021 03:22:47 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/formatting/wpAutop.php
r51623 r52010 9 9 * @ticket 11008 10 10 */ 11 function test_first_post() {11 public function test_first_post() { 12 12 $expected = '<p>Welcome to WordPress! This post contains important information. After you read it, you can make it private to hide it from visitors but still have the information handy for future reference.</p> 13 13 <p>First things first:</p> … … 283 283 * @ticket 27268 284 284 */ 285 function test_that_wpautop_treats_block_level_elements_as_blocks() {285 public function test_that_wpautop_treats_block_level_elements_as_blocks() { 286 286 $blocks = array( 287 287 'table', … … 377 377 * @ticket 27268 378 378 */ 379 function test_that_wpautop_does_not_wrap_blockquotes_but_does_autop_their_contents() {379 public function test_that_wpautop_does_not_wrap_blockquotes_but_does_autop_their_contents() { 380 380 $content = '<blockquote>foo</blockquote>'; 381 381 $expected = '<blockquote><p>foo</p></blockquote>'; … … 389 389 * @ticket 27268 390 390 */ 391 function test_that_wpautop_treats_inline_elements_as_inline() {391 public function test_that_wpautop_treats_inline_elements_as_inline() { 392 392 $inlines = array( 393 393 'a', … … 439 439 * @dataProvider data_element_sanity 440 440 */ 441 function test_element_sanity( $input, $output ) {441 public function test_element_sanity( $input, $output ) { 442 442 return $this->assertSame( $output, wpautop( $input ) ); 443 443 } 444 444 445 function data_element_sanity() {445 public function data_element_sanity() { 446 446 return array( 447 447 array( … … 491 491 * @ticket 33377 492 492 */ 493 function test_that_wpautop_skips_line_breaks_after_br() {493 public function test_that_wpautop_skips_line_breaks_after_br() { 494 494 $content = ' 495 495 line 1<br> … … 514 514 * @ticket 33377 515 515 */ 516 function test_that_wpautop_adds_a_paragraph_after_multiple_br() {516 public function test_that_wpautop_adds_a_paragraph_after_multiple_br() { 517 517 $content = ' 518 518 line 1<br> … … 532 532 * @ticket 4857 533 533 */ 534 function test_that_text_before_blocks_is_peed() {534 public function test_that_text_before_blocks_is_peed() { 535 535 $content = 'a<div>b</div>'; 536 536 $expected = "<p>a</p>\n<div>b</div>"; … … 547 547 * @ticket 39307 548 548 */ 549 function test_that_wpautop_does_not_add_extra_closing_p_in_figure() {549 public function test_that_wpautop_does_not_add_extra_closing_p_in_figure() { 550 550 $content1 = '<figure><img src="example.jpg" /><figcaption>Caption</figcaption></figure>'; 551 551 $expected1 = $content1; … … 566 566 * @ticket 14674 567 567 */ 568 function test_the_hr_is_not_peed() {568 public function test_the_hr_is_not_peed() { 569 569 $content = 'paragraph1<hr>paragraph2'; 570 570 $expected = "<p>paragraph1</p>\n<hr>\n<p>paragraph2</p>"; … … 578 578 * @ticket 9437 579 579 */ 580 function test_that_wpautop_ignores_inline_svgs() {580 public function test_that_wpautop_ignores_inline_svgs() { 581 581 $content = 582 582 '<svg xmlns="http://www.w3.org/2000/svg"> … … 596 596 * @ticket 9437 597 597 */ 598 function test_that_wpautop_ignores_inline_scripts() {598 public function test_that_wpautop_ignores_inline_scripts() { 599 599 $content = 600 600 '<script type="text/javascript">
Note: See TracChangeset
for help on using the changeset viewer.