function OembedUpdateTest::setUp
Same name in other branches
- 11.x core/modules/media/tests/src/Functional/FieldFormatter/OembedUpdateTest.php \Drupal\Tests\media\Functional\FieldFormatter\OembedUpdateTest::setUp()
Overrides UpdatePathTestBase::setUp
File
-
core/
modules/ media/ tests/ src/ Functional/ FieldFormatter/ OembedUpdateTest.php, line 22
Class
- OembedUpdateTest
- Tests eager-load upgrade path.
Namespace
Drupal\Tests\media\Functional\FieldFormatterCode
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.