function OEmbedFormatterTest::providerRender
Same name in other branches
- 9 core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php \Drupal\Tests\media\Functional\FieldFormatter\OEmbedFormatterTest::providerRender()
- 10 core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php \Drupal\Tests\media\Functional\FieldFormatter\OEmbedFormatterTest::providerRender()
- 11.x core/modules/media/tests/src/Functional/FieldFormatter/OEmbedFormatterTest.php \Drupal\Tests\media\Functional\FieldFormatter\OEmbedFormatterTest::providerRender()
Data provider for testRender().
Return value
array
See also
::testRender()
File
-
core/
modules/ media/ tests/ src/ Functional/ FieldFormatter/ OEmbedFormatterTest.php, line 57
Class
Namespace
Drupal\Tests\media\Functional\FieldFormatterCode
public function providerRender() {
return [
'Vimeo video' => [
'https://vimeo.com/7073899',
'video_vimeo.json',
[],
[
'iframe' => [
'src' => '/media/oembed?url=https%3A//vimeo.com/7073899',
'width' => '480',
'height' => '360',
'title' => 'Drupal Rap Video - Schipulcon09',
],
],
],
'Vimeo video, resized' => [
'https://vimeo.com/7073899',
'video_vimeo.json?maxwidth=100&maxheight=100',
[
'max_width' => '100',
'max_height' => '100',
],
[
'iframe' => [
'src' => '/media/oembed?url=https%3A//vimeo.com/7073899',
'width' => '100',
'height' => '100',
'title' => 'Drupal Rap Video - Schipulcon09',
],
],
],
'Vimeo video, no title' => [
'https://vimeo.com/7073899',
'video_vimeo-no-title.json',
[],
[
'iframe' => [
'src' => '/media/oembed?url=https%3A//vimeo.com/7073899',
'width' => '480',
'height' => '360',
'title' => NULL,
],
],
],
'tweet' => [
'https://twitter.com/drupaldevdays/status/935643039741202432',
'rich_twitter.json',
[],
[
'iframe' => [
'src' => '/media/oembed?url=https%3A//twitter.com/drupaldevdays/status/935643039741202432',
'width' => '550',
'height' => '360',
],
],
],
'Flickr photo' => [
'https://www.flickr.com/photos/amazeelabs/26497866357',
'photo_flickr.json',
[],
[
'img' => [
'src' => '/core/misc/druplicon.png',
'width' => '88',
'height' => '100',
],
],
],
'Flickr photo (no dimensions)' => [
'https://www.flickr.com/photos/amazeelabs/26497866357',
'photo_flickr_no_dimensions.json',
[],
[
'img' => [
'src' => '/core/misc/druplicon.png',
],
],
],
];
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.