You are here

protected function FileDownloadLinkMediaApplicableTest::setUp in File Download Link 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/FileDownloadLinkMediaApplicableTest.php, line 51

Class

FileDownloadLinkMediaApplicableTest
Class for testing file_download_link_media formatter.

Namespace

Drupal\Tests\file_download_link\Kernel

Code

protected function setUp() {
  parent::setUp();
  $this
    ->installConfig([
    'system',
    'field',
  ]);
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('node_type');
  $this
    ->installEntitySchema('media');
  $this
    ->installEntitySchema('media_type');
  $this
    ->createMediaType('file', [
    'id' => 'file_media',
    'label' => 'File Media',
  ]);
  $this
    ->createMediaType('image', [
    'id' => 'image_media',
    'label' => 'Image Media',
  ]);
  $this
    ->createMediaType('oembed:video', [
    'id' => 'oembed_media',
    'label' => 'Oembed Media',
  ]);
  $this->node = $this
    ->createTestNode();
}