mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Tests: wpautop() should not add extra </p> before <figcaption>.
Props pbearne. See #39307. git-svn-id: https://develop.svn.wordpress.org/trunk@39914 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -534,4 +534,28 @@ line 2<br/>
|
||||
|
||||
$this->assertEquals( $expected, trim( wpautop( $content ) ) );
|
||||
}
|
||||
|
||||
/**
|
||||
* wpautop() should not add extra </p> before <figcaption>
|
||||
*
|
||||
* @covers ::wpautop
|
||||
* @uses trim
|
||||
*
|
||||
* @ticket 39307
|
||||
*/
|
||||
function test_that_wpautop_doses_not_add_extra_closing_p_in_figure() {
|
||||
$content1 = $expected1 = '<figure><img src="example.jpg" /><figcaption>Caption</figcaption></figure>';
|
||||
|
||||
$content2 = '<figure>
|
||||
<img src="example.jpg" />
|
||||
<figcaption>Caption</figcaption>
|
||||
</figure>';
|
||||
|
||||
$expected2 = '<figure>
|
||||
<img src="example.jpg" /><figcaption>Caption</figcaption></figure>';
|
||||
|
||||
$this->assertEquals( $expected1, trim( wpautop( $content1 ) ) );
|
||||
$this->assertEquals( $expected2, trim( wpautop( $content2 ) ) );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user