Make WordPress Core

Ticket #23149: 23149-test.2.diff

File 23149-test.2.diff, 892 bytes (added by adamsilverstein, 11 years ago)

just look for expected https url somewhere in assertion

  • tests/phpunit/tests/media.php

     
    114114                $this->assertFalse( wp_oembed_remove_provider( 'http://foo.bar/*' ) );
    115115        }
    116116
     117        /**
     118         * @ticket 23149
     119         */
     120        function test_youtube_com_secure_embed() {
     121                global $wp_embed;
     122
     123                // Test secure youtube.com embeds
     124
     125                $out = wp_oembed_get( 'https://www.youtube.com/watch?v=oHg5SJYRHA0' );
     126                $this->assertContains( 'https://www.youtube.com/embed/oHg5SJYRHA0?feature=oembed', $out );
     127
     128                $out = wp_oembed_get( 'https://youtu.be/zHjMoNQN7s0' );
     129                $this->assertContains( 'https://www.youtube.com/embed/zHjMoNQN7s0?feature=oembed', $out );
     130
     131        }
     132
    117133        function test_wp_prepare_attachment_for_js() {
    118134                // Attachment without media
    119135                $id = wp_insert_attachment(array(