You are here

protected function MediaLibraryAddFormTest::setUp in Drupal 9

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

Overrides KernelTestBase::setUp

File

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

Class

MediaLibraryAddFormTest
Tests the media library add form.

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 an account with special UID 1.
  $this
    ->createUser([]);
  $this
    ->createMediaType('image', [
    'id' => 'image',
  ]);
  $this
    ->createMediaType('oembed:video', [
    'id' => 'remote_video',
  ]);
}