You are here

public function ProvidedFieldsTest::setup 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::setUp()

File

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

Class

ProvidedFieldsTest
Test the provided fields.

Namespace

Drupal\Tests\video_embed_media\Kernel

Code

public function setup() {
  parent::setup();
  $this
    ->installConfig([
    'media_entity',
  ]);
  $this->mediaVideoPlugin = $this->container
    ->get('plugin.manager.media_entity.type')
    ->createInstance('video_embed_field', []);
  $bundle = MediaBundle::create([
    'id' => 'video',
    'type' => 'video_embed_field',
  ]);
  $bundle
    ->save();
}