function MediaLibraryAddFormTest::setUp

Same name in other branches
  1. 9 core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php \Drupal\Tests\media_library\Kernel\MediaLibraryAddFormTest::setUp()
  2. 8.9.x core/modules/media_library/tests/src/Kernel/MediaLibraryAddFormTest.php \Drupal\Tests\media_library\Kernel\MediaLibraryAddFormTest::setUp()
  3. 10 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 44

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->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',
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.