You are here

public function DefaultNameTest::setup in Video Embed Field 8

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

File

modules/video_embed_media/tests/src/Kernel/DefaultNameTest.php, line 69

Class

DefaultNameTest
Test the media bundle default names.

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();
}