You are here

public function ProvidedFieldsTest::providedFieldsTestCases in Video Embed Field 8

Same name and namespace in other branches
  1. 8.2 modules/video_embed_media/tests/src/Kernel/ProvidedFieldsTest.php \Drupal\Tests\video_embed_media\Kernel\ProvidedFieldsTest::providedFieldsTestCases()

Test cases for ::testProvidedFields().

File

modules/video_embed_media/tests/src/Kernel/ProvidedFieldsTest.php, line 39

Class

ProvidedFieldsTest
Test the provided fields.

Namespace

Drupal\Tests\video_embed_media\Kernel

Code

public function providedFieldsTestCases() {
  return [
    'Video ID (YouTube)' => [
      'https://www.youtube.com/watch?v=gnERPdAiuSo',
      'id',
      'gnERPdAiuSo',
    ],
    'Video ID (Vimeo)' => [
      'https://vimeo.com/channels/staffpicks/153786080',
      'id',
      '153786080',
    ],
    'Video Source (YouTube)' => [
      'https://www.youtube.com/watch?v=gnERPdAiuSo',
      'source',
      'youtube',
    ],
    'Video Source (Vimeo)' => [
      'https://vimeo.com/channels/staffpicks/159700995',
      'source',
      'vimeo',
    ],
    'Video Thumbnail (YouTube)' => [
      'https://www.youtube.com/watch?v=gnERPdAiuSo',
      'image_local_uri',
      'public://video_thumbnails/gnERPdAiuSo.jpg',
    ],
    'Video Thumbnail (Vimeo)' => [
      'https://vimeo.com/channels/staffpicks/153786080',
      'image_local_uri',
      'public://video_thumbnails/153786080.jpg',
    ],
  ];
}