Make WordPress Core

Ticket #24484: 24484.ut.patch

File 24484.ut.patch, 2.5 KB (added by ocean90, 11 years ago)
  • trunk/tests/media.php

     
    224224This is a sentence that will all of a sudden contain {$html1} and then {$html2} and why not {$html3}
    225225BLOB;
    226226
    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 
    230227                $images = get_content_images( $blob );
    231228                $this->assertEquals( $images, array( $html1, $html2, $html3 ) );
    232229
    233230                $images = get_content_images( $blob, false );
    234231                $this->assertEquals( $images, array( $src1, $src2, $src3 ) );
    235232
    236                 $copyblob = $blob;
    237                 $images = get_content_images( $blob, true, true );
     233                $images = get_content_images( $blob, true );
    238234                $this->assertEquals( $images, array( $html1, $html2, $html3 ) );
    239                 $this->assertEquals( $blob, $imgless );
    240                 $blob = $copyblob;
    241235
    242                 $copyblob = $blob;
    243                 $images = get_content_images( $blob, false, true );
     236                $images = get_content_images( $blob, false );
    244237                $this->assertEquals( $images, array( $src1, $src2, $src3 ) );
    245                 $this->assertEquals( $blob, $imgless );
    246                 $blob = $copyblob;
    247238
    248                 $copyblob = $blob;
    249                 $images = get_content_images( $blob, true, true, 1 );
     239                $images = get_content_images( $blob, true, 1 );
    250240                $this->assertEquals( $images, array( $html1 ) );
    251                 $this->assertEquals( $blob, $imgless1 );
    252                 $blob = $copyblob;
    253241
    254                 $copyblob = $blob;
    255                 $images = get_content_images( $blob, false, true, 1 );
     242                $images = get_content_images( $blob, false, 1 );
    256243                $this->assertEquals( $images, array( $src1 ) );
    257                 $this->assertEquals( $blob, $imgless1 );
    258                 $blob = $copyblob;
    259244        }
    260245
    261246        /**
     
    265250                $blob =<<<BLOB
    266251This is a sentence that will all of a sudden contain {$this->img_html}
    267252BLOB;
    268                 $imgless = "This is a sentence that will all of a sudden contain ";
    269253
    270254                $image = get_content_image( $blob );
    271255                $this->assertEquals( $image, $this->img_html );
     
    273257                $image = get_content_image( $blob, false );
    274258                $this->assertEquals( $image, $this->img_url );
    275259
    276                 $image = get_content_image( $blob, false, true );
    277                 $this->assertEquals( $image, $this->img_url );
    278                 $this->assertEquals( $blob, $imgless );
    279 
    280260                $linked_html = '<a href="http://woo.com">' . $this->img_html . '</a>';
    281261                $blob = "This is a sentence that will all of a sudden contain $linked_html";
    282262                $image = get_content_image( $blob );