You are here

protected function FileDownloadLinkMediaTest::setUp in File Download Link 8

Overrides KernelTestBase::setUp

File

tests/src/Kernel/FileDownloadLinkMediaTest.php, line 40

Class

FileDownloadLinkMediaTest
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('file', [
    'file_usage',
  ]);
  $this
    ->installSchema('user', [
    'users_data',
  ]);
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('file');
  $this
    ->installEntitySchema('node');
  $this
    ->installEntitySchema('node_type');
  $this
    ->installEntitySchema('media');
  $this
    ->installEntitySchema('media_type');
  $this
    ->setUpCurrentUser([
    'uid' => 99,
  ], [
    'view media',
  ]);
  $this->media = $this
    ->createTestMedia();
  $this->node = $this
    ->createTestNode();
}