WordPress.org

Make WordPress Core

Ticket #32714: 32714.tests.patch

File 32714.tests.patch, 915 bytes (added by johnbillion, 6 years ago)
  • tests/phpunit/tests/media.php

     
    130130                $this->assertContains( 'https://www.youtube.com/embed/zHjMoNQN7s0?feature=oembed', $out );
    131131        }
    132132
     133        /**
     134         * Test m.youtube.com embeds
     135         *
     136         * @ticket 32714
     137         */
     138        function test_youtube_com_mobile_embed() {
     139                $out = wp_oembed_get( 'http://m.youtube.com/watch?v=oHg5SJYRHA0' );
     140                $this->assertContains( 'https://www.youtube.com/embed/oHg5SJYRHA0?feature=oembed', $out );
     141
     142                $out = wp_oembed_get( 'https://m.youtube.com/watch?v=oHg5SJYRHA0' );
     143                $this->assertContains( 'https://www.youtube.com/embed/oHg5SJYRHA0?feature=oembed', $out );
     144        }
     145
    133146        function test_youtube_embed_url() {
    134147                global $wp_embed;
    135148                $out = $wp_embed->autoembed( 'https://www.youtube.com/embed/QcIy9NiNbmo' );