Make WordPress Core

Ticket #23965: 23965-tests.diff

File 23965-tests.diff, 1.0 KB (added by wonderboymusic, 12 years ago)
  • tests/media.php

    diff --git tests/media.php tests/media.php
    index 101ae1c..faf0b6f 100644
    BLOB; 
    269269                $image = get_content_image( $blob, false, true );
    270270                $this->assertEquals( $image, $this->img_url );
    271271                $this->assertEquals( $blob, $imgless );
     272
     273                $linked_html = '<a href="http://woo.com">' . $this->img_html . '</a>';
     274                $blob = "This is a sentence that will all of a sudden contain $linked_html";
     275                $image = get_content_image( $blob );
     276                $this->assertEquals( $image, $linked_html );
     277
     278                $captioned_html = '[caption width="300"]<a href="http://woo.com">' . $this->img_html . '</a> A Caption[/caption]';
     279                $blob = "This is a sentence that will all of a sudden contain $captioned_html";
     280                $result = '<div class="wp-caption alignnone" style="width: 310px"><a href="http://woo.com"><img src="http://example.org/wp-content/uploads/image.jpg"/></a><p class="wp-caption-text">A Caption</p></div>';
     281                $image = get_content_image( $blob );
     282                $this->assertEquals( $image, $result );
    272283        }
    273284
    274285        /**