function MediaSettingsDefaultIframeDomainUpdateTest::setUp

Same name in other branches
  1. 10 core/modules/media/tests/src/Functional/Update/MediaSettingsDefaultIframeDomainUpdateTest.php \Drupal\Tests\media\Functional\Update\MediaSettingsDefaultIframeDomainUpdateTest::setUp()

Overrides BrowserTestBase::setUp

File

core/modules/media/tests/src/Functional/Update/MediaSettingsDefaultIframeDomainUpdateTest.php, line 38

Class

MediaSettingsDefaultIframeDomainUpdateTest
Tests update of media.settings:iframe_domain if it's still the default of "".

Namespace

Drupal\Tests\media\Functional\Update

Code

protected function setUp() : void {
    parent::setUp();
    // Because the test manually installs media module, the entity type config
    // must be manually installed similar to kernel tests.
    $entity_type_manager = \Drupal::entityTypeManager();
    $media = $entity_type_manager->getDefinition('media');
    \Drupal::service('entity_type.listener')->onEntityTypeCreate($media);
    $media_type = $entity_type_manager->getDefinition('media_type');
    \Drupal::service('entity_type.listener')->onEntityTypeCreate($media_type);
}

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