Changeset 45013 for branches/4.0/tests/phpunit/tests/post/filtering.php
- Timestamp:
- 03/26/2019 12:45:57 AM (6 years ago)
- Location:
- branches/4.0
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/4.0
- Property svn:mergeinfo changed
/trunk merged: 29860,29869,29954,30160,30530
- Property svn:mergeinfo changed
-
branches/4.0/tests/phpunit/tests/post/filtering.php
r25002 r45013 91 91 } 92 92 93 /**94 * make sure unbalanced tags are fixed when they span a --more-- tag95 * @ticket 629796 */97 function test_post_content_unbalanced_more() {98 $content = <<<EOF99 <em>some text<!--more-->100 that's continued after the jump</em>101 EOF;102 103 $expected = <<<EOF104 <em>some text</em><!--more-->105 that's continued after the jump106 EOF;107 108 $id = $this->factory->post->create( array( 'post_content' => $content ) );109 $post = get_post($id);110 111 $this->assertEquals( $expected, $post->post_content );112 }113 114 /**115 * make sure unbalanced tags are fixed when they span a --nextpage-- tag116 * @ticket 6297117 */118 function test_post_content_unbalanced_nextpage() {119 $content = <<<EOF120 <em>some text<!--nextpage-->121 that's continued after the jump</em>122 EOF;123 124 $expected = <<<EOF125 <em>some text</em><!--nextpage-->126 that's continued after the jump127 EOF;128 129 $id = $this->factory->post->create( array( 'post_content' => $content ) );130 $post = get_post($id);131 132 $this->assertEquals( $expected, $post->post_content );133 }134 135 /**136 * make sure unbalanced tags are fixed when they span both --more-- and --nextpage-- tags (in that order)137 * @ticket 6297138 */139 function test_post_content_unbalanced_more_nextpage() {140 $content = <<<EOF141 <em>some text<!--more-->142 that's continued after the jump</em>143 <!--nextpage-->144 <p>and the next page145 <!--nextpage-->146 breaks the graf</p>147 EOF;148 149 $expected = <<<EOF150 <em>some text</em><!--more-->151 that's continued after the jump152 <!--nextpage-->153 <p>and the next page154 </p><!--nextpage-->155 breaks the graf156 EOF;157 158 $id = $this->factory->post->create( array( 'post_content' => $content ) );159 $post = get_post($id);160 161 $this->assertEquals( $expected, $post->post_content );162 }163 164 /**165 * make sure unbalanced tags are fixed when they span both --nextpage-- and --more-- tags (in that order)166 * @ticket 6297167 */168 function test_post_content_unbalanced_nextpage_more() {169 $content = <<<EOF170 <em>some text<!--nextpage-->171 that's continued after the jump</em>172 <!--more-->173 <p>and the next page174 <!--nextpage-->175 breaks the graf</p>176 EOF;177 178 $expected = <<<EOF179 <em>some text</em><!--nextpage-->180 that's continued after the jump181 <!--more-->182 <p>and the next page183 </p><!--nextpage-->184 breaks the graf185 EOF;186 187 $id = $this->factory->post->create( array( 'post_content' => $content ) );188 $post = get_post($id);189 190 $this->assertEquals( $expected, $post->post_content );191 }192 193 93 // make sure unbalanced tags are untouched when the balance option is off 194 94 function test_post_content_nobalance_nextpage_more() {
Note: See TracChangeset
for help on using the changeset viewer.