diff --git a/entity_embed.api.php b/entity_embed.api.php
index ec83c6e..c2b7261 100644
--- a/entity_embed.api.php
+++ b/entity_embed.api.php
@@ -1,5 +1,8 @@
 <?php
 
+use Drupal\file\FileInterface;
+use Drupal\node\NodeInterface;
+use Drupal\Core\Entity\EntityInterface;
 /**
  * @file
  * Hooks provided by the Entity Embed module.
@@ -40,17 +43,17 @@ function hook_entity_embed_display_plugins_for_context_alter(array &$definitions
   $entity = $contexts['entity'];
 
   // For video and audio files, limit the available options to the media player.
-  if ($entity instanceof \Drupal\file\FileInterface && in_array($entity->bundle(), ['audio', 'video'])) {
+  if ($entity instanceof FileInterface && in_array($entity->bundle(), ['audio', 'video'])) {
     $definitions = array_intersect_key($definitions, array_flip(['file:jwplayer_formatter']));
   }
 
   // For images, use the image formatter.
-  if ($entity instanceof \Drupal\file\FileInterface && in_array($entity->bundle(), ['image'])) {
+  if ($entity instanceof FileInterface && in_array($entity->bundle(), ['image'])) {
     $definitions = array_intersect_key($definitions, array_flip(['image:image']));
   }
 
   // For nodes, use the default option.
-  if ($entity instanceof \Drupal\node\NodeInterface) {
+  if ($entity instanceof NodeInterface) {
     $definitions = array_intersect_key($definitions, array_flip(['entity_reference:entity_reference_entity_view']));
   }
 }
@@ -63,7 +66,7 @@ function hook_entity_embed_display_plugins_for_context_alter(array &$definitions
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity object.
  */
-function hook_entity_embed_context_alter(array &$context, \Drupal\Core\Entity\EntityInterface $entity) {
+function hook_entity_embed_context_alter(array &$context, EntityInterface $entity) {
   if (isset($context['overrides']) && is_array($context['overrides'])) {
     foreach ($context['overrides'] as $key => $value) {
       $entity->key = $value;
@@ -79,7 +82,7 @@ function hook_entity_embed_context_alter(array &$context, \Drupal\Core\Entity\En
  * @param \Drupal\Core\Entity\EntityInterface $entity
  *   The entity object.
  */
-function hook_ENTITY_TYPE_embed_context_alter(array &$context, \Drupal\Core\Entity\EntityInterface $entity) {
+function hook_ENTITY_TYPE_embed_context_alter(array &$context, EntityInterface $entity) {
   if (isset($context['overrides']) && is_array($context['overrides'])) {
     foreach ($context['overrides'] as $key => $value) {
       $entity->key = $value;
@@ -101,7 +104,7 @@ function hook_ENTITY_TYPE_embed_context_alter(array &$context, \Drupal\Core\Enti
  * @param array $context
  *   The context array.
  */
-function hook_entity_embed_alter(array &$build, \Drupal\Core\Entity\EntityInterface $entity, array &$context) {
+function hook_entity_embed_alter(array &$build, EntityInterface $entity, array &$context) {
   // Remove the contextual links.
   if (isset($build['#contextual_links'])) {
     unset($build['#contextual_links']);
@@ -118,7 +121,7 @@ function hook_entity_embed_alter(array &$build, \Drupal\Core\Entity\EntityInterf
  * @param array $context
  *   The context array.
  */
-function hook_ENTITY_TYPE_embed_alter(array &$build, \Drupal\Core\Entity\EntityInterface $entity, array &$context) {
+function hook_ENTITY_TYPE_embed_alter(array &$build, EntityInterface $entity, array &$context) {
   // Remove the contextual links.
   if (isset($build['#contextual_links'])) {
     unset($build['#contextual_links']);
diff --git a/src/Form/EntityEmbedDialog.php b/src/Form/EntityEmbedDialog.php
index 5ae3b11..f08b8ab 100644
--- a/src/Form/EntityEmbedDialog.php
+++ b/src/Form/EntityEmbedDialog.php
@@ -415,7 +415,7 @@ class EntityEmbedDialog extends FormBase {
         $entity_label = $entity->toLink($entity->label(), 'canonical', $options)->toString();
       }
       elseif ($entity->getEntityTypeId() == 'file') {
-        $entity_label = '<a href="' . file_create_url($entity->getFileUri()) . '" target="_blank">' . $entity->label() . '</a>';
+        $entity_label = '<a href="' . \Drupal::service('file_url_generator')->generateAbsoluteString($entity->getFileUri()) . '" target="_blank">' . $entity->label() . '</a>';
       }
       else {
         $entity_label = '<a href="' . $entity->toUrl()->toString() . '" target="_blank">' . $entity->label() . '</a>';
diff --git a/src/Plugin/EmbedType/Entity.php b/src/Plugin/EmbedType/Entity.php
index 554ff3d..3f874c6 100644
--- a/src/Plugin/EmbedType/Entity.php
+++ b/src/Plugin/EmbedType/Entity.php
@@ -273,7 +273,7 @@ class Entity extends EmbedTypeBase implements ContainerFactoryPluginInterface {
    * {@inheritdoc}
    */
   public function getDefaultIconUrl() {
-    return file_create_url(drupal_get_path('module', 'entity_embed') . '/js/plugins/drupalentity/entity.png');
+    return \Drupal::service('file_url_generator')->generateAbsoluteString(\Drupal::service('extension.list.module')->getPath('entity_embed') . '/js/plugins/drupalentity/entity.png');
   }
 
   /**
diff --git a/src/Plugin/Filter/EntityEmbedFilter.php b/src/Plugin/Filter/EntityEmbedFilter.php
index f244f89..1a79514 100644
--- a/src/Plugin/Filter/EntityEmbedFilter.php
+++ b/src/Plugin/Filter/EntityEmbedFilter.php
@@ -158,7 +158,7 @@ class EntityEmbedFilter extends FilterBase implements ContainerFactoryPluginInte
           }
           if (!$entity instanceof EntityInterface) {
             $missing_text = $this->t('Missing @type.', ['@type' => $this->entityTypeManager->getDefinition($entity_type)->getSingularLabel()]);
-            $entity_output = '<img src="' . file_url_transform_relative(file_create_url('core/modules/media/images/icons/no-thumbnail.png')) . '" width="180" height="180" alt="' . $missing_text . '" title="' . $missing_text . '"/>';
+            $entity_output = '<img src="' . \Drupal::service('file_url_generator')->generateString('core/modules/media/images/icons/no-thumbnail.png') . '" width="180" height="180" alt="' . $missing_text . '" title="' . $missing_text . '"/>';
             throw new EntityNotFoundException(sprintf('Unable to load embedded %s entity %s.', $entity_type, $id));
           }
         }
diff --git a/tests/src/Functional/EntityEmbedDialogTest.php b/tests/src/Functional/EntityEmbedDialogTest.php
index a781d0a..ac2a914 100644
--- a/tests/src/Functional/EntityEmbedDialogTest.php
+++ b/tests/src/Functional/EntityEmbedDialogTest.php
@@ -16,7 +16,7 @@ class EntityEmbedDialogTest extends EntityEmbedTestBase {
    *
    * @var array
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * Tests the entity embed dialog.
diff --git a/tests/src/Functional/EntityEmbedDisplayManagerTest.php b/tests/src/Functional/EntityEmbedDisplayManagerTest.php
index c18ab25..8d6b509 100644
--- a/tests/src/Functional/EntityEmbedDisplayManagerTest.php
+++ b/tests/src/Functional/EntityEmbedDisplayManagerTest.php
@@ -58,7 +58,7 @@ class EntityEmbedDisplayManagerTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->imageButton = $this->container->get('entity_type.manager')
diff --git a/tests/src/Functional/EntityEmbedEntityBrowserTest.php b/tests/src/Functional/EntityEmbedEntityBrowserTest.php
index 28ee225..0ea506d 100644
--- a/tests/src/Functional/EntityEmbedEntityBrowserTest.php
+++ b/tests/src/Functional/EntityEmbedEntityBrowserTest.php
@@ -19,7 +19,7 @@ class EntityEmbedEntityBrowserTest extends EntityEmbedDialogTest {
    *
    * @var array
    */
-  public static $modules = ['entity_browser'];
+  protected static $modules = ['entity_browser'];
 
   /**
    * Tests the entity browser integration.
diff --git a/tests/src/Functional/EntityEmbedHooksTest.php b/tests/src/Functional/EntityEmbedHooksTest.php
index 99d30f9..2737cae 100644
--- a/tests/src/Functional/EntityEmbedHooksTest.php
+++ b/tests/src/Functional/EntityEmbedHooksTest.php
@@ -19,7 +19,7 @@ class EntityEmbedHooksTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->state = $this->container->get('state');
   }
diff --git a/tests/src/Functional/EntityEmbedTestBase.php b/tests/src/Functional/EntityEmbedTestBase.php
index 5bebea6..6646c1a 100644
--- a/tests/src/Functional/EntityEmbedTestBase.php
+++ b/tests/src/Functional/EntityEmbedTestBase.php
@@ -50,7 +50,7 @@ abstract class EntityEmbedTestBase extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Create a page content type.
diff --git a/tests/src/Functional/EntityEmbedTwigTest.php b/tests/src/Functional/EntityEmbedTwigTest.php
index 6ec214a..b5fa45d 100644
--- a/tests/src/Functional/EntityEmbedTwigTest.php
+++ b/tests/src/Functional/EntityEmbedTwigTest.php
@@ -14,7 +14,7 @@ class EntityEmbedTwigTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     \Drupal::service('theme_installer')->install(['test_theme']);
   }
@@ -34,19 +34,19 @@ class EntityEmbedTwigTest extends EntityEmbedTestBase {
   public function testEntityEmbedTwigFunction() {
     // Test embedding a node using entity ID.
     $this->drupalGet('entity_embed_twig_test/id');
-    $this->assertText($this->node->body->value, 'Embedded node exists in page');
+    $this->assertSession()->pageTextContains($this->node->body->value);
 
     // Test 'Label' Entity Embed Display plugin.
     $this->drupalGet('entity_embed_twig_test/label_plugin');
-    $this->assertText($this->node->title->value, 'Title of the embedded node exists in page.');
-    $this->assertNoText($this->node->body->value, 'Body of embedded node does not exists in page when "Label" plugin is used.');
-    $this->assertLinkByHref('node/' . $this->node->id(), 0, 'Link to the embedded node exists when "Label" plugin is used.');
+    $this->assertSession()->pageTextContains($this->node->title->value);
+    $this->assertSession()->pageTextNotContains($this->node->body->value);
+    $this->assertSession()->linkByHrefExists('node/' . $this->node->id(), 0, 'Link to the embedded node exists when "Label" plugin is used.');
 
     // Test 'Label' Entity Embed Display plugin without linking to the node.
     $this->drupalGet('entity_embed_twig_test/label_plugin_no_link');
-    $this->assertText($this->node->title->value, 'Title of the embedded node exists in page.');
-    $this->assertNoText($this->node->body->value, 'Body of embedded node does not exists in page when "Label" plugin is used.');
-    $this->assertNoLinkByHref('node/' . $this->node->id(), 0, 'Link to the embedded node does not exists.');
+    $this->assertSession()->pageTextContains($this->node->title->value);
+    $this->assertSession()->pageTextNotContains($this->node->body->value);
+    $this->assertSession()->linkByHrefNotExists('node/' . $this->node->id(), 0, 'Link to the embedded node does not exists.');
   }
 
 }
diff --git a/tests/src/Functional/EntityEmbedUpdateHookTest.php b/tests/src/Functional/EntityEmbedUpdateHookTest.php
index f967102..a47ba8e 100644
--- a/tests/src/Functional/EntityEmbedUpdateHookTest.php
+++ b/tests/src/Functional/EntityEmbedUpdateHookTest.php
@@ -24,7 +24,7 @@ class EntityEmbedUpdateHookTest extends UpdatePathTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $button = $this->container
       ->get('entity_type.manager')
diff --git a/tests/src/Functional/EntityReferenceFieldFormatterTest.php b/tests/src/Functional/EntityReferenceFieldFormatterTest.php
index b78b51d..2e7ec8b 100644
--- a/tests/src/Functional/EntityReferenceFieldFormatterTest.php
+++ b/tests/src/Functional/EntityReferenceFieldFormatterTest.php
@@ -21,7 +21,7 @@ class EntityReferenceFieldFormatterTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Add a new menu entity which does not has a view controller.
diff --git a/tests/src/Functional/FileFieldFormatterTest.php b/tests/src/Functional/FileFieldFormatterTest.php
index 351ba1b..228ba3b 100644
--- a/tests/src/Functional/FileFieldFormatterTest.php
+++ b/tests/src/Functional/FileFieldFormatterTest.php
@@ -17,7 +17,7 @@ class FileFieldFormatterTest extends EntityEmbedTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'image'];
+  protected static $modules = ['file', 'image'];
 
   /**
    * Created file entity.
@@ -29,7 +29,7 @@ class FileFieldFormatterTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->file = $this->getTestFile('text');
   }
@@ -81,7 +81,7 @@ class FileFieldFormatterTest extends EntityEmbedTestBase {
     // Verify description of the embedded file exists in page.
     $this->assertSession()->responseContains($embed_settings['description']);
     $this->assertSession()->responseNotContains('This placeholder should not be rendered.');
-    $this->assertSession()->linkByHrefExists(file_url_transform_relative(file_create_url($this->file->getFileUri())), 0, 'Link to the embedded file exists.');
+    $this->assertSession()->linkByHrefExists(\Drupal::service('file_url_generator')->generateString($this->file->getFileUri()), 0, 'Link to the embedded file exists.');
   }
 
 }
diff --git a/tests/src/Functional/ImageFieldFormatterTest.php b/tests/src/Functional/ImageFieldFormatterTest.php
index 95cbc30..2a0c977 100644
--- a/tests/src/Functional/ImageFieldFormatterTest.php
+++ b/tests/src/Functional/ImageFieldFormatterTest.php
@@ -17,7 +17,7 @@ class ImageFieldFormatterTest extends EntityEmbedTestBase {
    *
    * @var array
    */
-  public static $modules = ['file', 'image', 'responsive_image'];
+  protected static $modules = ['file', 'image', 'responsive_image'];
 
   /**
    * Created file entity.
@@ -36,7 +36,7 @@ class ImageFieldFormatterTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->image = $this->getTestFile('image');
     $this->file = $this->getTestFile('text');
@@ -107,7 +107,7 @@ class ImageFieldFormatterTest extends EntityEmbedTestBase {
     // when embed is successful.
     $this->assertSession()->responseContains($alt_text);
     $this->assertSession()->responseNotContains('This placeholder should not be rendered.');
-    $this->assertSession()->linkByHrefExists(file_url_transform_relative(file_create_url($this->image->getFileUri())), 0, 'Link to the embedded image exists.');
+    $this->assertSession()->linkByHrefExists(\Drupal::service('file_url_generator')->generateString($this->image->getFileUri()), 0, 'Link to the embedded image exists.');
 
     // Embed all three field types in one, to ensure they all render correctly.
     $content = '<drupal-entity data-entity-type="node" data-entity-uuid="' . $this->node->uuid() . '" data-entity-embed-display="entity_reference:entity_reference_label"></drupal-entity>';
diff --git a/tests/src/FunctionalJavascript/ButtonAdminTest.php b/tests/src/FunctionalJavascript/ButtonAdminTest.php
index 272dda5..39dd369 100644
--- a/tests/src/FunctionalJavascript/ButtonAdminTest.php
+++ b/tests/src/FunctionalJavascript/ButtonAdminTest.php
@@ -39,7 +39,7 @@ class ButtonAdminTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->container
diff --git a/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php b/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
index b3d1804..6693b8d 100644
--- a/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
+++ b/tests/src/FunctionalJavascript/CKEditorIntegrationTest.php
@@ -56,7 +56,7 @@ class CKEditorIntegrationTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->button = $this->container->get('entity_type.manager')
diff --git a/tests/src/FunctionalJavascript/ConfigurationUiTest.php b/tests/src/FunctionalJavascript/ConfigurationUiTest.php
index 7abdf03..5b6e5f9 100644
--- a/tests/src/FunctionalJavascript/ConfigurationUiTest.php
+++ b/tests/src/FunctionalJavascript/ConfigurationUiTest.php
@@ -32,7 +32,7 @@ class ConfigurationUiTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $format = FilterFormat::create([
diff --git a/tests/src/FunctionalJavascript/ContentTranslationTest.php b/tests/src/FunctionalJavascript/ContentTranslationTest.php
index 86c579c..35dffd5 100644
--- a/tests/src/FunctionalJavascript/ContentTranslationTest.php
+++ b/tests/src/FunctionalJavascript/ContentTranslationTest.php
@@ -23,12 +23,12 @@ class ContentTranslationTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_embed_translation_test'];
+  protected static $modules = ['entity_embed_translation_test'];
 
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->translator = $this->drupalCreateUser([
diff --git a/tests/src/FunctionalJavascript/EntityEmbedDialogTest.php b/tests/src/FunctionalJavascript/EntityEmbedDialogTest.php
index 8008cdc..227f59d 100644
--- a/tests/src/FunctionalJavascript/EntityEmbedDialogTest.php
+++ b/tests/src/FunctionalJavascript/EntityEmbedDialogTest.php
@@ -18,7 +18,7 @@ class EntityEmbedDialogTest extends EntityEmbedTestBase {
    *
    * @var array
    */
-  public static $modules = ['image'];
+  protected static $modules = ['image'];
 
   /**
    * The test user.
@@ -37,7 +37,7 @@ class EntityEmbedDialogTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Create a page content type.
diff --git a/tests/src/FunctionalJavascript/ImageFieldFormatterTest.php b/tests/src/FunctionalJavascript/ImageFieldFormatterTest.php
index cb864aa..5d16c94 100644
--- a/tests/src/FunctionalJavascript/ImageFieldFormatterTest.php
+++ b/tests/src/FunctionalJavascript/ImageFieldFormatterTest.php
@@ -63,7 +63,7 @@ class ImageFieldFormatterTest extends WebDriverTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->button = $this->container->get('entity_type.manager')
diff --git a/tests/src/FunctionalJavascript/MediaImageTest.php b/tests/src/FunctionalJavascript/MediaImageTest.php
index 9965905..b4c3cff 100644
--- a/tests/src/FunctionalJavascript/MediaImageTest.php
+++ b/tests/src/FunctionalJavascript/MediaImageTest.php
@@ -50,12 +50,12 @@ class MediaImageTest extends EntityEmbedTestBase {
   /**
    * {@inheritdoc}
    */
-  public static $modules = ['entity_embed_test'];
+  protected static $modules = ['entity_embed_test'];
 
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Note that media_install() grants 'view media' to all users by default.
diff --git a/tests/src/Kernel/EntityEmbedFilterDisabledIntegrationsTest.php b/tests/src/Kernel/EntityEmbedFilterDisabledIntegrationsTest.php
index f47ada0..9465c66 100644
--- a/tests/src/Kernel/EntityEmbedFilterDisabledIntegrationsTest.php
+++ b/tests/src/Kernel/EntityEmbedFilterDisabledIntegrationsTest.php
@@ -21,7 +21,7 @@ class EntityEmbedFilterDisabledIntegrationsTest extends EntityEmbedFilterTestBas
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->installConfig('system');
diff --git a/tests/src/Kernel/EntityEmbedFilterLegacyTest.php b/tests/src/Kernel/EntityEmbedFilterLegacyTest.php
index f060f90..ea9093e 100644
--- a/tests/src/Kernel/EntityEmbedFilterLegacyTest.php
+++ b/tests/src/Kernel/EntityEmbedFilterLegacyTest.php
@@ -12,7 +12,7 @@ class EntityEmbedFilterLegacyTest extends EntityEmbedFilterTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->installConfig('system');
diff --git a/tests/src/Kernel/EntityEmbedFilterOverridesTest.php b/tests/src/Kernel/EntityEmbedFilterOverridesTest.php
index 22a4de2..832e25e 100644
--- a/tests/src/Kernel/EntityEmbedFilterOverridesTest.php
+++ b/tests/src/Kernel/EntityEmbedFilterOverridesTest.php
@@ -38,7 +38,7 @@ class EntityEmbedFilterOverridesTest extends EntityEmbedFilterTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->installSchema('file', ['file_usage']);
diff --git a/tests/src/Kernel/EntityEmbedFilterTest.php b/tests/src/Kernel/EntityEmbedFilterTest.php
index 854e354..ae1d1d3 100644
--- a/tests/src/Kernel/EntityEmbedFilterTest.php
+++ b/tests/src/Kernel/EntityEmbedFilterTest.php
@@ -24,7 +24,7 @@ class EntityEmbedFilterTest extends EntityEmbedFilterTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->installConfig('system');
@@ -275,7 +275,7 @@ class EntityEmbedFilterTest extends EntityEmbedFilterTestBase {
     $this->assertNotEmpty($deleted_embed_warning);
     $this->assertHasAttributes($deleted_embed_warning[0], [
       'alt' => $expected_missing_text,
-      'src' => file_url_transform_relative(file_create_url('core/modules/media/images/icons/no-thumbnail.png')),
+      'src' => \Drupal::service('file_url_generator')->generateString('core/modules/media/images/icons/no-thumbnail.png'),
       'title' => $expected_missing_text,
     ]);
   }
diff --git a/tests/src/Kernel/EntityEmbedFilterTestBase.php b/tests/src/Kernel/EntityEmbedFilterTestBase.php
index 43e287f..da28fec 100644
--- a/tests/src/Kernel/EntityEmbedFilterTestBase.php
+++ b/tests/src/Kernel/EntityEmbedFilterTestBase.php
@@ -59,7 +59,7 @@ abstract class EntityEmbedFilterTestBase extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->installSchema('node', 'node_access');
diff --git a/tests/src/Kernel/EntityEmbedFilterTranslationTest.php b/tests/src/Kernel/EntityEmbedFilterTranslationTest.php
index 7f907aa..383c89f 100644
--- a/tests/src/Kernel/EntityEmbedFilterTranslationTest.php
+++ b/tests/src/Kernel/EntityEmbedFilterTranslationTest.php
@@ -22,7 +22,7 @@ class EntityEmbedFilterTranslationTest extends EntityEmbedFilterTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     ConfigurableLanguage::createFromLangcode('pt-br')->save();
