function MediaSettingsDefaultIframeDomainUpdateTest::setUp
Same name in other branches
- 11.x core/modules/media/tests/src/Functional/Update/MediaSettingsDefaultIframeDomainUpdateTest.php \Drupal\Tests\media\Functional\Update\MediaSettingsDefaultIframeDomainUpdateTest::setUp()
Overrides UpdatePathTestBase::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\UpdateCode
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.