| 537 | |
| 538 | /** |
| 539 | * wpautop() should add an extra </p> |
| 540 | * |
| 541 | * "<div><span></span></p> |
| 542 | * <div></div> |
| 543 | * </div> |
| 544 | * " |
| 545 | * @covers ::wpautop |
| 546 | * @uses trim |
| 547 | * |
| 548 | * @ticket 39377 |
| 549 | */ |
| 550 | function test_that_wpautop_doses_not_extra_closing_p_in_figure() { |
| 551 | $content = '<figure><img src="/wp-content/uploads/example.jpg" alt="something" /><figcaption>Caption</figcaption></figure>'; |
| 552 | |
| 553 | $expected = '<figure><img src="/wp-content/uploads/example.jpg" alt="something" /> |
| 554 | <figcaption>Caption</figcaption> |
| 555 | </figure>'; |
| 556 | |
| 557 | $this->assertEquals( $expected, trim( wpautop( $content ) ) ); |
| 558 | } |
| 559 | |