Ticket #24484: 24484.ut.patch
File 24484.ut.patch, 2.5 KB (added by , 11 years ago) |
---|
-
trunk/tests/media.php
224 224 This is a sentence that will all of a sudden contain {$html1} and then {$html2} and why not {$html3} 225 225 BLOB; 226 226 227 $imgless = "This is a sentence that will all of a sudden contain and then and why not ";228 $imgless1 = "This is a sentence that will all of a sudden contain and then {$html2} and why not {$html3}";229 230 227 $images = get_content_images( $blob ); 231 228 $this->assertEquals( $images, array( $html1, $html2, $html3 ) ); 232 229 233 230 $images = get_content_images( $blob, false ); 234 231 $this->assertEquals( $images, array( $src1, $src2, $src3 ) ); 235 232 236 $copyblob = $blob; 237 $images = get_content_images( $blob, true, true ); 233 $images = get_content_images( $blob, true ); 238 234 $this->assertEquals( $images, array( $html1, $html2, $html3 ) ); 239 $this->assertEquals( $blob, $imgless );240 $blob = $copyblob;241 235 242 $copyblob = $blob; 243 $images = get_content_images( $blob, false, true ); 236 $images = get_content_images( $blob, false ); 244 237 $this->assertEquals( $images, array( $src1, $src2, $src3 ) ); 245 $this->assertEquals( $blob, $imgless );246 $blob = $copyblob;247 238 248 $copyblob = $blob; 249 $images = get_content_images( $blob, true, true, 1 ); 239 $images = get_content_images( $blob, true, 1 ); 250 240 $this->assertEquals( $images, array( $html1 ) ); 251 $this->assertEquals( $blob, $imgless1 );252 $blob = $copyblob;253 241 254 $copyblob = $blob; 255 $images = get_content_images( $blob, false, true, 1 ); 242 $images = get_content_images( $blob, false, 1 ); 256 243 $this->assertEquals( $images, array( $src1 ) ); 257 $this->assertEquals( $blob, $imgless1 );258 $blob = $copyblob;259 244 } 260 245 261 246 /** … … 265 250 $blob =<<<BLOB 266 251 This is a sentence that will all of a sudden contain {$this->img_html} 267 252 BLOB; 268 $imgless = "This is a sentence that will all of a sudden contain ";269 253 270 254 $image = get_content_image( $blob ); 271 255 $this->assertEquals( $image, $this->img_html ); … … 273 257 $image = get_content_image( $blob, false ); 274 258 $this->assertEquals( $image, $this->img_url ); 275 259 276 $image = get_content_image( $blob, false, true );277 $this->assertEquals( $image, $this->img_url );278 $this->assertEquals( $blob, $imgless );279 280 260 $linked_html = '<a href="http://woo.com">' . $this->img_html . '</a>'; 281 261 $blob = "This is a sentence that will all of a sudden contain $linked_html"; 282 262 $image = get_content_image( $blob );