diff --git a/modules/entity_reference_integrity_enforce/tests/src/Functional/EnforcedIntegrityTest.php b/modules/entity_reference_integrity_enforce/tests/src/Functional/EnforcedIntegrityTest.php
index 02da778..c9c5025 100644
--- a/modules/entity_reference_integrity_enforce/tests/src/Functional/EnforcedIntegrityTest.php
+++ b/modules/entity_reference_integrity_enforce/tests/src/Functional/EnforcedIntegrityTest.php
@@ -37,7 +37,7 @@ class EnforcedIntegrityTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->drupalLogin($this->rootUser);
   }
@@ -71,9 +71,10 @@ class EnforcedIntegrityTest extends BrowserTestBase {
     // Initially, deleting an entity should be fine if it's not enabled.
     $this->assertSession()->elementsCount('css', '.form-submit', 1);
     $this->assertSession()->elementNotExists('css', '.form-submit[disabled]');
+    $this->drupalGet('admin/config/content/entity-reference-integrity');
 
     // Enable protection of the entity type.
-    $this->drupalPostForm('admin/config/content/entity-reference-integrity', [
+    $this->submitForm([
       sprintf('enabled_entity_type_ids[%s]', $entity->getEntityTypeId()) => TRUE,
     ], 'Save configuration');
 
diff --git a/modules/entity_reference_integrity_enforce/tests/src/Kernel/EntityPredeleteHookTest.php b/modules/entity_reference_integrity_enforce/tests/src/Kernel/EntityPredeleteHookTest.php
index e0fd365..abd0c7a 100644
--- a/modules/entity_reference_integrity_enforce/tests/src/Kernel/EntityPredeleteHookTest.php
+++ b/modules/entity_reference_integrity_enforce/tests/src/Kernel/EntityPredeleteHookTest.php
@@ -16,7 +16,7 @@ class EntityPredeleteHookTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'comment',
     'entity_reference_integrity_enforce',
   ];
diff --git a/tests/src/Kernel/EntityReferenceDependencyManagerTest.php b/tests/src/Kernel/EntityReferenceDependencyManagerTest.php
index 5beecf4..4d01a55 100644
--- a/tests/src/Kernel/EntityReferenceDependencyManagerTest.php
+++ b/tests/src/Kernel/EntityReferenceDependencyManagerTest.php
@@ -20,7 +20,7 @@ class EntityReferenceDependencyManagerTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'system',
     'node',
     'user',
@@ -51,7 +51,7 @@ class EntityReferenceDependencyManagerTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->installEntitySchema('node');
     $this->installEntitySchema('user');
