Ticket #23149: 23149-test.2.diff
File 23149-test.2.diff, 892 bytes (added by , 11 years ago) |
---|
-
tests/phpunit/tests/media.php
114 114 $this->assertFalse( wp_oembed_remove_provider( 'http://foo.bar/*' ) ); 115 115 } 116 116 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 117 133 function test_wp_prepare_attachment_for_js() { 118 134 // Attachment without media 119 135 $id = wp_insert_attachment(array(