Changeset 38684 for trunk/tests/phpunit/tests/oembed.php
- Timestamp:
- 09/30/2016 11:24:08 AM (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/oembed.php
r38514 r38684 9 9 'vimeo' => '#https?://(.+\.)?vimeo\.com/.*#i', 10 10 'dailymotion' => '#https?://(www\.)?dailymotion\.com/.*#i', 11 'dailymotion-shorturl' => '#https?://dai .ly/.*#i',11 'dailymotion-shorturl' => '#https?://dai\.ly/.*#i', 12 12 'flickr' => '#https?://(www\.)?flickr\.com/.*#i', 13 13 'flickr-shorturl' => '#https?://flic\.kr/.*#i', … … 17 17 'photobucket-group' => 'http://gi*.photobucket.com/groups/*', 18 18 'scribd' => '#https?://(www\.)?scribd\.com/doc/.*#i', 19 'wordpress-tv' => '#https?://wordpress .tv/.*#i',19 'wordpress-tv' => '#https?://wordpress\.tv/.*#i', 20 20 'polldaddy' => '#https?://(.+\.)?polldaddy\.com/.*#i', 21 21 'polldaddy-shorturl' => '#https?://poll\.fm/.*#i', … … 24 24 'twitter-timeline' => '#https?://(www\.)?twitter\.com/.+?/timelines/.*#i', 25 25 'twitter-moment' => '#https?://(www\.)?twitter\.com/i/moments/.*#i', 26 'vine' => '#https?://vine .co/v/.*#i',26 'vine' => '#https?://vine\.co/v/.*#i', 27 27 'soundcloud' => '#https?://(www\.)?soundcloud\.com/.*#i', 28 28 'slideshare' => '#https?://(.+?\.)?slideshare\.net/.*#i', … … 41 41 'cloudup' => '#https?://cloudup\.com/.*#i', 42 42 'reverbnation' => '#https?://(www\.)?reverbnation\.com/.*#i', 43 'videopress' => '#https?://videopress .com/v/.*#',43 'videopress' => '#https?://videopress\.com/v/.*#', 44 44 'reddit-comments' => '#https?://(www\.)?reddit\.com/r/[^/]+/comments/.*#i', 45 45 'speakerdeck' => '#https?://(www\.)?speakerdeck\.com/.*#i', … … 813 813 } 814 814 815 /** 816 * Test URLs that should not match any of the predefined providers. 817 * 818 * @group oembed 819 * @ticket 38187 820 * 821 * @dataProvider dataShouldNotMatchOembedRegex 822 */ 823 public function testUrlShouldNotMatchOembedRegex( $url ) { 824 825 $this->assertSame( false, self::$oembed->get_provider( $url, array( 'discover' => false ) ) ); 826 827 } 828 829 /** 830 * Data provider for testUrlShouldNotMatchOembedRegex(). 831 * 832 * @return array 833 */ 834 public function dataShouldNotMatchOembedRegex() { 835 $providers = self::$provider_map; 836 837 return array( 838 array( 'http://dairly/something' ), 839 array( 'https://daisly/' ), 840 array( 'http://wordpressstv/' ), 841 array( 'https://wordpressstv/somethingelse' ), 842 array( 'http://vinerco/v/andanother' ), 843 array( 'https://vineqco/v/' ), 844 array( 'http://videopressscom/v/' ), 845 array( 'https://videopresstcom/v/covered' ), 846 ); 847 } 815 848 }
Note: See TracChangeset
for help on using the changeset viewer.