public function UrlResolverTest::providerUrlDiscovery in Drupal 8
Same name and namespace in other branches
- 9 core/modules/media/tests/src/Functional/UrlResolverTest.php \Drupal\Tests\media\Functional\UrlResolverTest::providerUrlDiscovery()
Data provider for testUrlDiscovery().
Return value
array
See also
::testUrlDiscovery()
File
- core/
modules/ media/ tests/ src/ Functional/ UrlResolverTest.php, line 98
Class
- UrlResolverTest
- Tests the oEmbed URL resolver service.
Namespace
Drupal\Tests\media\FunctionalCode
public function providerUrlDiscovery() {
return [
'JSON resource' => [
'video_vimeo.html',
'https://vimeo.com/api/oembed.json?url=video_vimeo.html',
],
'XML resource' => [
'video_collegehumor.html',
// The endpoint does not explicitly declare that it supports XML, so
// only JSON support is assumed, which is why the discovered URL
// contains '.json'. However, the fetched HTML file contains a
// relationship to an XML representation of the resource, with the
// application/xml+oembed MIME type.
'http://www.collegehumor.com/oembed.json?url=video_collegehumor.html',
],
];
}