You are here

protected function MediaLibraryStateTest::setUp in Drupal 8

Same name and namespace in other branches
  1. 9 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 39

Class

MediaLibraryStateTest
Tests the media library state value object.

Namespace

Drupal\Tests\media_library\Kernel

Code

protected function setUp() {
  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',
  ]);
}