Remove failing Unbalanced tags tests
Patch with tests added to #6297 for use in the future Props MikeHansenMe for creating patch of current unit test see #30284 git-svn-id: https://develop.svn.wordpress.org/trunk@30291 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
44825185f7
commit
218924d9ee
@ -90,106 +90,6 @@ EOF;
|
|||||||
$this->assertEquals( $expected, $post->post_content );
|
$this->assertEquals( $expected, $post->post_content );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* make sure unbalanced tags are fixed when they span a --more-- tag
|
|
||||||
* @ticket 6297
|
|
||||||
*/
|
|
||||||
function test_post_content_unbalanced_more() {
|
|
||||||
$content = <<<EOF
|
|
||||||
<em>some text<!--more-->
|
|
||||||
that's continued after the jump</em>
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$expected = <<<EOF
|
|
||||||
<em>some text</em><!--more-->
|
|
||||||
that's continued after the jump
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$id = $this->factory->post->create( array( 'post_content' => $content ) );
|
|
||||||
$post = get_post($id);
|
|
||||||
|
|
||||||
$this->assertEquals( $expected, $post->post_content );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* make sure unbalanced tags are fixed when they span a --nextpage-- tag
|
|
||||||
* @ticket 6297
|
|
||||||
*/
|
|
||||||
function test_post_content_unbalanced_nextpage() {
|
|
||||||
$content = <<<EOF
|
|
||||||
<em>some text<!--nextpage-->
|
|
||||||
that's continued after the jump</em>
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$expected = <<<EOF
|
|
||||||
<em>some text</em><!--nextpage-->
|
|
||||||
that's continued after the jump
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$id = $this->factory->post->create( array( 'post_content' => $content ) );
|
|
||||||
$post = get_post($id);
|
|
||||||
|
|
||||||
$this->assertEquals( $expected, $post->post_content );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* make sure unbalanced tags are fixed when they span both --more-- and --nextpage-- tags (in that order)
|
|
||||||
* @ticket 6297
|
|
||||||
*/
|
|
||||||
function test_post_content_unbalanced_more_nextpage() {
|
|
||||||
$content = <<<EOF
|
|
||||||
<em>some text<!--more-->
|
|
||||||
that's continued after the jump</em>
|
|
||||||
<!--nextpage-->
|
|
||||||
<p>and the next page
|
|
||||||
<!--nextpage-->
|
|
||||||
breaks the graf</p>
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$expected = <<<EOF
|
|
||||||
<em>some text</em><!--more-->
|
|
||||||
that's continued after the jump
|
|
||||||
<!--nextpage-->
|
|
||||||
<p>and the next page
|
|
||||||
</p><!--nextpage-->
|
|
||||||
breaks the graf
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$id = $this->factory->post->create( array( 'post_content' => $content ) );
|
|
||||||
$post = get_post($id);
|
|
||||||
|
|
||||||
$this->assertEquals( $expected, $post->post_content );
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* make sure unbalanced tags are fixed when they span both --nextpage-- and --more-- tags (in that order)
|
|
||||||
* @ticket 6297
|
|
||||||
*/
|
|
||||||
function test_post_content_unbalanced_nextpage_more() {
|
|
||||||
$content = <<<EOF
|
|
||||||
<em>some text<!--nextpage-->
|
|
||||||
that's continued after the jump</em>
|
|
||||||
<!--more-->
|
|
||||||
<p>and the next page
|
|
||||||
<!--nextpage-->
|
|
||||||
breaks the graf</p>
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$expected = <<<EOF
|
|
||||||
<em>some text</em><!--nextpage-->
|
|
||||||
that's continued after the jump
|
|
||||||
<!--more-->
|
|
||||||
<p>and the next page
|
|
||||||
</p><!--nextpage-->
|
|
||||||
breaks the graf
|
|
||||||
EOF;
|
|
||||||
|
|
||||||
$id = $this->factory->post->create( array( 'post_content' => $content ) );
|
|
||||||
$post = get_post($id);
|
|
||||||
|
|
||||||
$this->assertEquals( $expected, $post->post_content );
|
|
||||||
}
|
|
||||||
|
|
||||||
// make sure unbalanced tags are untouched when the balance option is off
|
// make sure unbalanced tags are untouched when the balance option is off
|
||||||
function test_post_content_nobalance_nextpage_more() {
|
function test_post_content_nobalance_nextpage_more() {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user