Embeds: Update the oEmbed provider test suite.

* Remove the manual flag for HTTPS support and replace it with a simple check on the URL format.
* Ensure `testOembedTestsCoverAllProviders()` actually fails when a new provider is added without a corresponding test.

See #32360


git-svn-id: https://develop.svn.wordpress.org/trunk@38512 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
John Blackbourn 2016-09-02 21:35:51 +00:00
parent 4484e2d2c3
commit 84d26aac05

View File

@ -3,57 +3,55 @@
class Tests_oEmbed extends WP_UnitTestCase { class Tests_oEmbed extends WP_UnitTestCase {
protected static $oembed; protected static $oembed;
protected static $provider_map = array( protected static $provider_map = array(
'youtube' => '#https?://((m|www)\.)?youtube\.com/watch.*#i', 'youtube' => '#https?://((m|www)\.)?youtube\.com/watch.*#i',
'youtube-playlist' => '#https?://((m|www)\.)?youtube\.com/playlist.*#i', 'youtube-playlist' => '#https?://((m|www)\.)?youtube\.com/playlist.*#i',
'youtube-shorturl' => '#https?://youtu\.be/.*#i', 'youtube-shorturl' => '#https?://youtu\.be/.*#i',
'vimeo' => '#https?://(.+\.)?vimeo\.com/.*#i', 'vimeo' => '#https?://(.+\.)?vimeo\.com/.*#i',
'dailymotion' => '#https?://(www\.)?dailymotion\.com/.*#i', 'dailymotion' => '#https?://(www\.)?dailymotion\.com/.*#i',
'dailymotion-shorturl' => '#https?://dai.ly/.*#i', 'dailymotion-shorturl' => '#https?://dai.ly/.*#i',
'flickr' => '#https?://(www\.)?flickr\.com/.*#i', 'flickr' => '#https?://(www\.)?flickr\.com/.*#i',
'flickr-shorturl' => '#https?://flic\.kr/.*#i', 'flickr-shorturl' => '#https?://flic\.kr/.*#i',
'smugmug' => '#https?://(.+\.)?smugmug\.com/.*#i', 'smugmug' => '#https?://(.+\.)?smugmug\.com/.*#i',
'hulu' => '#https?://(www\.)?hulu\.com/watch/.*#i', 'hulu' => '#https?://(www\.)?hulu\.com/watch/.*#i',
'photobucket-album' => 'http://i*.photobucket.com/albums/*', 'photobucket-album' => 'http://i*.photobucket.com/albums/*',
'photobucket-group' => 'http://gi*.photobucket.com/groups/*', 'photobucket-group' => 'http://gi*.photobucket.com/groups/*',
'scribd' => '#https?://(www\.)?scribd\.com/doc/.*#i', 'scribd' => '#https?://(www\.)?scribd\.com/doc/.*#i',
'wordpress-tv' => '#https?://wordpress.tv/.*#i', 'wordpress-tv' => '#https?://wordpress.tv/.*#i',
'polldaddy' => '#https?://(.+\.)?polldaddy\.com/.*#i', 'polldaddy' => '#https?://(.+\.)?polldaddy\.com/.*#i',
'polldaddy-shorturl' => '#https?://poll\.fm/.*#i', 'polldaddy-shorturl' => '#https?://poll\.fm/.*#i',
'funnyordie' => '#https?://(www\.)?funnyordie\.com/videos/.*#i', 'funnyordie' => '#https?://(www\.)?funnyordie\.com/videos/.*#i',
'twitter' => '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i', 'twitter' => '#https?://(www\.)?twitter\.com/.+?/status(es)?/.*#i',
'twitter-timeline' => '#https?://(www\.)?twitter\.com/.+?/timelines/.*#i', 'twitter-timeline' => '#https?://(www\.)?twitter\.com/.+?/timelines/.*#i',
'twitter-moment' => '#https?://(www\.)?twitter\.com/i/moments/.*#i', 'twitter-moment' => '#https?://(www\.)?twitter\.com/i/moments/.*#i',
'vine' => '#https?://vine.co/v/.*#i', 'vine' => '#https?://vine.co/v/.*#i',
'soundcloud' => '#https?://(www\.)?soundcloud\.com/.*#i', 'soundcloud' => '#https?://(www\.)?soundcloud\.com/.*#i',
'slideshare' => '#https?://(.+?\.)?slideshare\.net/.*#i', 'slideshare' => '#https?://(.+?\.)?slideshare\.net/.*#i',
'instagram' => '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i', 'instagram' => '#https?://(www\.)?instagr(\.am|am\.com)/p/.*#i',
'spotify' => '#https?://(open|play)\.spotify\.com/.*#i', 'spotify' => '#https?://(open|play)\.spotify\.com/.*#i',
'imgur' => '#https?://(.+\.)?imgur\.com/.*#i', 'imgur' => '#https?://(.+\.)?imgur\.com/.*#i',
'meetup' => '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i', 'meetup' => '#https?://(www\.)?meetu(\.ps|p\.com)/.*#i',
'issuu' => '#https?://(www\.)?issuu\.com/.+/docs/.+#i', 'issuu' => '#https?://(www\.)?issuu\.com/.+/docs/.+#i',
'collegehumor' => '#https?://(www\.)?collegehumor\.com/video/.*#i', 'collegehumor' => '#https?://(www\.)?collegehumor\.com/video/.*#i',
'mixcloud' => '#https?://(www\.)?mixcloud\.com/.*#i', 'mixcloud' => '#https?://(www\.)?mixcloud\.com/.*#i',
'ted' => '#https?://(www\.|embed\.)?ted\.com/talks/.*#i', 'ted' => '#https?://(www\.|embed\.)?ted\.com/talks/.*#i',
'animoto' => '#https?://(www\.)?(animoto|video214)\.com/play/.*#i', 'animoto' => '#https?://(www\.)?(animoto|video214)\.com/play/.*#i',
'tumblr' => '#https?://(.+)\.tumblr\.com/post/.*#i', 'tumblr' => '#https?://(.+)\.tumblr\.com/post/.*#i',
'kickstarter' => '#https?://(www\.)?kickstarter\.com/projects/.*#i', 'kickstarter' => '#https?://(www\.)?kickstarter\.com/projects/.*#i',
'kickstarter-shorturl' => '#https?://kck\.st/.*#i', 'kickstarter-shorturl' => '#https?://kck\.st/.*#i',
'cloudup' => '#https?://cloudup\.com/.*#i', 'cloudup' => '#https?://cloudup\.com/.*#i',
'reverbnation' => '#https?://(www\.)?reverbnation\.com/.*#i', 'reverbnation' => '#https?://(www\.)?reverbnation\.com/.*#i',
'videopress' => '#https?://videopress.com/v/.*#', 'videopress' => '#https?://videopress.com/v/.*#',
'reddit-comments' => '#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i', 'reddit-comments' => '#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i',
'speakerdeck' => '#https?://(www\.)?speakerdeck\.com/.*#i', 'speakerdeck' => '#https?://(www\.)?speakerdeck\.com/.*#i',
'facebook-post' => '#https?://www\.facebook\.com/.*/posts/.*#i', 'facebook-post' => '#https?://www\.facebook\.com/.*/posts/.*#i',
'facebook-photo' => '#https?://www\.facebook\.com/photo(s/|\.php).*#i', 'facebook-activity' => '#https?://www\.facebook\.com/.*/activity/.*#i',
'facebook-permalink' => '#https?://www\.facebook\.com/permalink\.php.*#i', 'facebook-photo' => '#https?://www\.facebook\.com/photo(s/|\.php).*#i',
'facebook-media' => '#https?://www\.facebook\.com/media/.*#i', 'facebook-permalink' => '#https?://www\.facebook\.com/permalink\.php.*#i',
'facebook-notes' => '#https?://www\.facebook\.com/notes/.*#i', 'facebook-media' => '#https?://www\.facebook\.com/media/.*#i',
'facebook-video' => '#https?://www\.facebook\.com/.*/videos/.*#i', 'facebook-questions' => '#https?://www\.facebook\.com/questions/.*#i',
'facebook-videophp' => '#https?://www\.facebook\.com/video\.php.*#i', 'facebook-notes' => '#https?://www\.facebook\.com/notes/.*#i',
// I can't find URLs in this format 'facebook-video' => '#https?://www\.facebook\.com/.*/videos/.*#i',
//'facebook-activity' => '#https?://www\.facebook\.com/.*/activity/.*#i', 'facebook-videophp' => '#https?://www\.facebook\.com/video\.php.*#i',
// Questions has been RIP since 2012, URLs (if you can find them) should still work
//'facebook-questions' => '#https?://www\.facebook\.com/questions/.*#i',
); );
/** /**
@ -76,7 +74,7 @@ class Tests_oEmbed extends WP_UnitTestCase {
* *
* @dataProvider oEmbedProviderData * @dataProvider oEmbedProviderData
*/ */
public function testOembedTestURLsResolve( $match, array $urls, $supports_https ) { public function testOembedTestURLsResolve( $match, array $urls ) {
if ( empty( $urls ) ) { if ( empty( $urls ) ) {
$this->markTestIncomplete(); $this->markTestIncomplete();
@ -108,7 +106,7 @@ class Tests_oEmbed extends WP_UnitTestCase {
* *
* @dataProvider oEmbedProviderData * @dataProvider oEmbedProviderData
*/ */
public function testOembedProviderReturnsExpectedResponse( $match, array $urls, $supports_https ) { public function testOembedProviderReturnsExpectedResponse( $match, array $urls ) {
if ( empty( $urls ) ) { if ( empty( $urls ) ) {
$this->markTestIncomplete(); $this->markTestIncomplete();
@ -120,10 +118,11 @@ class Tests_oEmbed extends WP_UnitTestCase {
'width' => 500, 'width' => 500,
'height' => 500, 'height' => 500,
); );
$test_urls = $urls; $supports_https = ( 0 === strpos( $match, '#https?' ) );
if ( $supports_https ) { foreach ( $urls as $url ) {
foreach ( $urls as $url ) { $test_urls[] = set_url_scheme( $url, 'http' );
if ( $supports_https ) {
$test_urls[] = set_url_scheme( $url, 'https' ); $test_urls[] = set_url_scheme( $url, 'https' );
} }
} }
@ -319,7 +318,7 @@ class Tests_oEmbed extends WP_UnitTestCase {
* *
* @dataProvider oEmbedProviderData * @dataProvider oEmbedProviderData
*/ */
public function testOembedProviderHandlesInvalidData( $match, array $urls, $supports_https ) { public function testOembedProviderHandlesInvalidData( $match, array $urls ) {
if ( empty( $urls ) ) { if ( empty( $urls ) ) {
$this->markTestIncomplete(); $this->markTestIncomplete();
@ -415,7 +414,7 @@ class Tests_oEmbed extends WP_UnitTestCase {
public function testOembedTestsCoverAllProviders() { public function testOembedTestsCoverAllProviders() {
$tests = wp_list_pluck( $this->oEmbedProviderData(), 0 ); $tests = wp_list_pluck( $this->oEmbedProviderData(), 0 );
$providers = array_values( self::$provider_map ); $providers = array_keys( self::$oembed->providers );
$missing = array_diff( $providers, $tests ); $missing = array_diff( $providers, $tests );
$this->assertEmpty( $missing, sprintf( "These oEmbed providers are not tested:\n- %s", implode( "\n- ", $missing ) ) ); $this->assertEmpty( $missing, sprintf( "These oEmbed providers are not tested:\n- %s", implode( "\n- ", $missing ) ) );
@ -439,6 +438,22 @@ class Tests_oEmbed extends WP_UnitTestCase {
} }
/**
* Test the tests
*
* @group oembed
* @ticket 32360
*
*/
public function testOembedTestProvidersMatchActualProviders() {
$providers = array_keys( self::$oembed->providers );
$provider_map = array_values( self::$provider_map );
$this->assertEquals( $providers, $provider_map );
}
/** /**
* Data provider for our oEmbed tests * Data provider for our oEmbed tests
* *
@ -448,220 +463,167 @@ class Tests_oEmbed extends WP_UnitTestCase {
$providers = self::$provider_map; $providers = self::$provider_map;
return array( return array(
// YouTube without www
array( array(
$providers['youtube'], $providers['youtube'],
array( array(
'http://youtube.com/watch?v=zdtD19tXX30', 'http://youtube.com/watch?v=zdtD19tXX30',
'http://m.youtube.com/watch?v=QkP_rOCBrpY', 'http://m.youtube.com/watch?v=QkP_rOCBrpY',
'http://www.youtube.com/watch?v=bDRQRdFaFEo',
), ),
false, // HTTPS handled by different endpoints
), ),
// YouTube with www
array(
$providers['youtube'],
array(
'https://www.youtube.com/watch?v=bDRQRdFaFEo',
'https://m.youtube.com/watch?v=yfUflij74P4',
),
false, // HTTPS handled by different endpoints
),
// YouTube Playlist without www
array(
$providers['youtube-playlist'],
array(
'https://youtube.com/playlist?list=PL93B9F6B77FBB0160',
'https://m.youtube.com/playlist?list=PL1AC02C68F976A10F',
),
false, // HTTPS handled by different endpoints
),
// YouTube Playlist with www
array( array(
$providers['youtube-playlist'], $providers['youtube-playlist'],
array( array(
'http://youtube.com/playlist?list=PL93B9F6B77FBB0160',
'http://m.youtube.com/playlist?list=PL1AC02C68F976A10F',
'http://www.youtube.com/playlist?list=PLC7D2959C96B8D27B', 'http://www.youtube.com/playlist?list=PLC7D2959C96B8D27B',
'http://m.youtube.com/playlist?list=PLEC422D53B7588DC7',
), ),
false, // HTTPS handled by different endpoints
), ),
// YouTube HTTP Short Url
array( array(
$providers['youtube-shorturl'], $providers['youtube-shorturl'],
array( array(
'http://youtu.be/nfWlot6h_JM?list=PLirAqAtl_h2r5g8xGajEwdXd3x1sZh8hC', 'http://youtu.be/nfWlot6h_JM?list=PLirAqAtl_h2r5g8xGajEwdXd3x1sZh8hC',
'http://youtu.be/U8SYRUYfs_I',
), ),
false, // HTTPS handled by different endpoints
),
// YouTube HTTPS Short Url
array(
$providers['youtube-shorturl'],
array(
'https://youtu.be/U8SYRUYfs_I',
),
false, // HTTPS handled by different endpoints
), ),
array( array(
$providers['vimeo'], $providers['vimeo'],
array( array(
'http://vimeo.com/12339198', 'http://vimeo.com/12339198',
), ),
true,
), ),
array( array(
$providers['dailymotion'], $providers['dailymotion'],
array( array(
'http://www.dailymotion.com/video/x27bwvb_how-to-wake-up-better_news', 'http://www.dailymotion.com/video/x27bwvb_how-to-wake-up-better_news',
), ),
true,
), ),
array( array(
$providers['dailymotion-shorturl'], $providers['dailymotion-shorturl'],
array( array(
'http://dai.ly/x33exze', 'http://dai.ly/x33exze',
), ),
false, // No HTTPS support
), ),
array( array(
$providers['flickr'], $providers['flickr'],
array( array(
'http://www.flickr.com/photos/bon/14004280667/', 'http://www.flickr.com/photos/bon/14004280667/',
), ),
true,
), ),
array( array(
$providers['flickr-shorturl'], $providers['flickr-shorturl'],
array( array(
'http://flic.kr/p/6BFrbQ', 'http://flic.kr/p/6BFrbQ',
), ),
true,
), ),
array( array(
$providers['smugmug'], $providers['smugmug'],
array( array(
'http://fotoeffects.smugmug.com/Daily-shots-for-the-dailies/Dailies/6928550_9gMRmv/476011624_WhGWpts#!i=476011624&k=WhGWpts', 'http://fotoeffects.smugmug.com/Daily-shots-for-the-dailies/Dailies/6928550_9gMRmv/476011624_WhGWpts#!i=476011624&k=WhGWpts',
), ),
true,
), ),
array( array(
$providers['hulu'], $providers['hulu'],
array( array(
'http://www.hulu.com/watch/807443', 'http://www.hulu.com/watch/807443',
), ),
true,
), ),
array( array(
$providers['photobucket-album'], $providers['photobucket-album'],
array( array(
'http://i415.photobucket.com/albums/pp236/Keefers_/Keffers%20Animals/funny-cats-a10.jpg', 'http://i415.photobucket.com/albums/pp236/Keefers_/Keffers%20Animals/funny-cats-a10.jpg',
), ),
false, // No HTTPS support
), ),
array( array(
$providers['photobucket-group'], $providers['photobucket-group'],
array( array(
// ?? // ??
), ),
false, // No HTTPS support
), ),
array( array(
$providers['scribd'], $providers['scribd'],
array( array(
'http://www.scribd.com/doc/110799637/Synthesis-of-Knowledge-Effects-of-Fire-and-Thinning-Treatments-on-Understory-Vegetation-in-Dry-U-S-Forests', 'http://www.scribd.com/doc/110799637/Synthesis-of-Knowledge-Effects-of-Fire-and-Thinning-Treatments-on-Understory-Vegetation-in-Dry-U-S-Forests',
), ),
true,
), ),
array( array(
$providers['wordpress-tv'], $providers['wordpress-tv'],
array( array(
'http://wordpress.tv/2015/08/18/billie/', 'http://wordpress.tv/2015/08/18/billie/',
), ),
true,
), ),
array( array(
$providers['polldaddy'], $providers['polldaddy'],
array( array(
'http://polldaddy.com/poll/9066794/', 'http://polldaddy.com/poll/9066794/',
), ),
true,
), ),
array( array(
$providers['polldaddy-shorturl'], $providers['polldaddy-shorturl'],
array( array(
'http://poll.fm/5ebze', 'http://poll.fm/5ebze',
), ),
false, // No HTTPS support
), ),
array( array(
$providers['funnyordie'], $providers['funnyordie'],
array( array(
'http://www.funnyordie.com/videos/e5ef40bf2a/cute-overload', 'http://www.funnyordie.com/videos/e5ef40bf2a/cute-overload',
), ),
true,
), ),
array( array(
$providers['twitter'], $providers['twitter'],
array( array(
'http://twitter.com/WordPress/status/633718182335922177', 'http://twitter.com/WordPress/status/633718182335922177',
), ),
true,
), ),
array( array(
$providers['twitter-timeline'], $providers['twitter-timeline'],
array( array(
'https://twitter.com/wordpress', 'https://twitter.com/wordpress',
), ),
true,
), ),
array( array(
$providers['twitter-moment'], $providers['twitter-moment'],
array( array(
'https://twitter.com/i/moments/770661957397573633', 'https://twitter.com/i/moments/770661957397573633',
), ),
true,
), ),
array( array(
$providers['reddit-comments'], $providers['reddit-comments'],
array( array(
'https://www.reddit.com/r/Wordpress/comments/3xerq8/list_of_useful_wordpress_functions/' 'https://www.reddit.com/r/Wordpress/comments/3xerq8/list_of_useful_wordpress_functions/'
), ),
true,
), ),
array( array(
$providers['vine'], $providers['vine'],
array( array(
'http://vine.co/v/OjiLun5LuQ6', 'http://vine.co/v/OjiLun5LuQ6',
), ),
true,
), ),
array( array(
$providers['soundcloud'], $providers['soundcloud'],
array( array(
'http://soundcloud.com/steveaoki/kid-cudi-pursuit-of-happiness', 'http://soundcloud.com/steveaoki/kid-cudi-pursuit-of-happiness',
), ),
true,
), ),
array( array(
$providers['slideshare'], $providers['slideshare'],
array( array(
'http://www.slideshare.net/haraldf/business-quotes-for-2011', 'http://www.slideshare.net/haraldf/business-quotes-for-2011',
), ),
true,
), ),
array( array(
$providers['instagram'], $providers['instagram'],
array( array(
'http://instagram.com/p/68WqXbTcfl/', 'http://instagram.com/p/68WqXbTcfl/',
'https://instagram.com/p/68WqXbTcfl/',
'http://instagr.am/p/MRM3HQy6kh/', 'http://instagr.am/p/MRM3HQy6kh/',
), ),
false, // No HTTPS support on instagr.am
), ),
array( array(
$providers['spotify'], $providers['spotify'],
array( array(
'http://open.spotify.com/track/2i1KmyEXN3pNLwdxAWSGcg', 'http://open.spotify.com/track/2i1KmyEXN3pNLwdxAWSGcg',
), ),
true,
), ),
array( array(
$providers['imgur'], $providers['imgur'],
@ -669,7 +631,6 @@ class Tests_oEmbed extends WP_UnitTestCase {
'http://imgur.com/a/WdJim', 'http://imgur.com/a/WdJim',
'http://i.imgur.com/mbOPX2L.png', 'http://i.imgur.com/mbOPX2L.png',
), ),
true,
), ),
array( array(
$providers['meetup'], $providers['meetup'],
@ -677,35 +638,30 @@ class Tests_oEmbed extends WP_UnitTestCase {
'http://www.meetup.com/WordPress-Amsterdam/events/224346396/', 'http://www.meetup.com/WordPress-Amsterdam/events/224346396/',
'http://meetu.ps/2L533w', 'http://meetu.ps/2L533w',
), ),
true,
), ),
array( array(
$providers['issuu'], $providers['issuu'],
array( array(
'http://issuu.com/vmagazine/docs/v87', 'http://issuu.com/vmagazine/docs/v87',
), ),
true,
), ),
array( array(
$providers['collegehumor'], $providers['collegehumor'],
array( array(
'http://www.collegehumor.com/video/2862877/jake-and-amir-math', 'http://www.collegehumor.com/video/2862877/jake-and-amir-math',
), ),
true,
), ),
array( array(
$providers['mixcloud'], $providers['mixcloud'],
array( array(
'http://www.mixcloud.com/8_8s/disclosurefriends/', 'http://www.mixcloud.com/8_8s/disclosurefriends/',
), ),
true,
), ),
array( array(
$providers['ted'], $providers['ted'],
array( array(
'http://www.ted.com/talks/rodney_mullen_pop_an_ollie_and_innovate', 'http://www.ted.com/talks/rodney_mullen_pop_an_ollie_and_innovate',
), ),
true,
), ),
array( array(
$providers['animoto'], $providers['animoto'],
@ -713,35 +669,30 @@ class Tests_oEmbed extends WP_UnitTestCase {
'http://animoto.com/play/MlRRgXHhoT8gOZyHanM6TA', 'http://animoto.com/play/MlRRgXHhoT8gOZyHanM6TA',
'http://video214.com/play/MlRRgXHhoT8gOZyHanM6TA', 'http://video214.com/play/MlRRgXHhoT8gOZyHanM6TA',
), ),
true,
), ),
array( array(
$providers['tumblr'], $providers['tumblr'],
array( array(
'http://yahoo.tumblr.com/post/50902111638/tumblr-yahoo', 'http://yahoo.tumblr.com/post/50902111638/tumblr-yahoo',
), ),
false, // No HTTPS support
), ),
array( array(
$providers['kickstarter'], $providers['kickstarter'],
array( array(
'http://www.kickstarter.com/projects/zackdangerbrown/potato-salad', 'http://www.kickstarter.com/projects/zackdangerbrown/potato-salad',
), ),
true,
), ),
array( array(
$providers['kickstarter-shorturl'], $providers['kickstarter-shorturl'],
array( array(
'http://kck.st/1ukxHcx', 'http://kck.st/1ukxHcx',
), ),
false, // No HTTPS support
), ),
array( array(
$providers['cloudup'], $providers['cloudup'],
array( array(
'http://cloudup.com/cWX2Bi5DmfJ', 'http://cloudup.com/cWX2Bi5DmfJ',
), ),
true,
), ),
array( array(
$providers['reverbnation'], $providers['reverbnation'],
@ -749,77 +700,66 @@ class Tests_oEmbed extends WP_UnitTestCase {
'http://www.reverbnation.com/enemyplanes/song/16729753-we-want-blood', 'http://www.reverbnation.com/enemyplanes/song/16729753-we-want-blood',
'http://www.reverbnation.com/enemyplanes', 'http://www.reverbnation.com/enemyplanes',
), ),
true,
), ),
array( array(
$providers['videopress'], $providers['videopress'],
array( array(
'https://videopress.com/v/kUJmAcSf', 'https://videopress.com/v/kUJmAcSf',
), ),
true,
), ),
array( array(
$providers['speakerdeck'], $providers['speakerdeck'],
array( array(
'https://speakerdeck.com/tollmanz/scaling-wordpress' 'https://speakerdeck.com/tollmanz/scaling-wordpress'
), ),
true
), ),
array( array(
$providers['facebook-post'], $providers['facebook-post'],
array( array(
'https://www.facebook.com/WordPress/posts/10154220015487911' 'https://www.facebook.com/WordPress/posts/10154220015487911'
), ),
true
), ),
// array( array(
// $providers['facebook-activity'], $providers['facebook-activity'],
// array( array(
// '' // ??
// ), ),
// true ),
// ),
array( array(
$providers['facebook-photo'], $providers['facebook-photo'],
array( array(
'https://www.facebook.com/WordPress/photos/a.111006762910.97747.6427302910/10153207719422911/' 'https://www.facebook.com/WordPress/photos/a.111006762910.97747.6427302910/10153207719422911/'
), ),
true
), ),
array( array(
$providers['facebook-permalink'], $providers['facebook-permalink'],
array( array(
'https://www.facebook.com/permalink.php?story_fbid=10154220015487911' 'https://www.facebook.com/permalink.php?story_fbid=10154220015487911'
), ),
true
), ),
array( array(
$providers['facebook-media'], $providers['facebook-media'],
array( array(
'https://www.facebook.com/media/set/?set=a.164630483698579.1073741878.150601778434783&type=1&l=6c3a7725d5' 'https://www.facebook.com/media/set/?set=a.164630483698579.1073741878.150601778434783&type=1&l=6c3a7725d5'
), ),
true
), ),
// array( array(
// $providers['facebook-questions'], $providers['facebook-questions'],
// array( array(
// '' // ??
// ), ),
// true ),
// ),
array( array(
$providers['facebook-notes'], $providers['facebook-notes'],
array( array(
'https://www.facebook.com/notes/facebook/searching-for-answers-ask-facebook-questions/411795942130/' 'https://www.facebook.com/notes/facebook/searching-for-answers-ask-facebook-questions/411795942130/'
), ),
true
), ),
array( array(
$providers['facebook-video'], $providers['facebook-video'],
array( array(
'https://www.facebook.com/WordPress/videos/317622575398/' 'https://www.facebook.com/WordPress/videos/317622575398/'
), ),
true
), ),
array( array(
$providers['facebook-videophp'], $providers['facebook-videophp'],
@ -827,7 +767,6 @@ class Tests_oEmbed extends WP_UnitTestCase {
'https://www.facebook.com/video.php?v=317622575398', 'https://www.facebook.com/video.php?v=317622575398',
'https://www.facebook.com/video.php?id=317622575398', 'https://www.facebook.com/video.php?id=317622575398',
), ),
true
), ),
); );
} }