public function ProviderUrlParseTest::urlsWithExpectedIds in Video Embed Facebook 8
A data provider for URL parsing test cases.
Return value
array An array of test cases.
File
- tests/
src/ Unit/ ProviderUrlParseTest.php, line 30
Class
- ProviderUrlParseTest
- Test that URL parsing for the provider is functioning.
Namespace
Drupal\Tests\video_embed_facebook\UnitCode
public function urlsWithExpectedIds() {
return [
[
'https://www.facebook.com/viralthreaddotcom/videos/925673600907816/',
'925673600907816',
],
[
'http://www.facebook.com/viralthreaddotcom/videos/925673600907816/',
'925673600907816',
],
[
'http://facebook.com/viralthreaddotcom/videos/925673600907816/',
'925673600907816',
],
[
'http://facebook.com/viralthreaddotcom/videos/925673600907816',
'925673600907816',
],
[
'http://facebook.com/viralthreaddotcom/videos/925673600907816',
'925673600907816',
],
[
'https://www.facebook.com/Departement.Gironde/videos/1112970215438894',
'1112970215438894',
],
[
'https://www.facebook.com/CoD3Rs/videos/123123',
'123123',
],
[
'https://www.facebook.com/video.php?v=925673600907816',
'925673600907816',
],
[
'https://www.facebook.com/video.php?v=123ABC',
FALSE,
],
[
'https://www.facebook.com/viralthreaddotcom/notvideos/925673600907816/',
FALSE,
],
[
'https://www.facebook.com/videos/925673600907816/',
FALSE,
],
[
'https://www.facebook.com/925673600907816/',
FALSE,
],
];
}