You are here

protected function MediaLibraryStateTest::setUp in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php \Drupal\Tests\media_library\Kernel\MediaLibraryStateTest::setUp()

Overrides KernelTestBase::setUp

File

core/modules/media_library/tests/src/Kernel/MediaLibraryStateTest.php, line 41

Class

MediaLibraryStateTest
Tests the media library state value object.

Namespace

Drupal\Tests\media_library\Kernel

Code

protected function setUp() : void {
  parent::setUp();
  $this
    ->installEntitySchema('user');
  $this
    ->installEntitySchema('file');
  $this
    ->installSchema('file', 'file_usage');
  $this
    ->installSchema('system', 'sequences');
  $this
    ->installEntitySchema('media');
  $this
    ->installConfig([
    'field',
    'system',
    'file',
    'image',
    'media',
    'media_library',
  ]);

  // Create some media types to validate against.
  $this
    ->createMediaType('file', [
    'id' => 'document',
  ]);
  $this
    ->createMediaType('image', [
    'id' => 'image',
  ]);
  $this
    ->createMediaType('video_file', [
    'id' => 'video',
  ]);
}