diff --git a/tests/src/Functional/ViewUnpublishedMultilingualTest.php b/tests/src/Functional/ViewUnpublishedMultilingualTest.php
index ec79a1c..ec880f4 100644
--- a/tests/src/Functional/ViewUnpublishedMultilingualTest.php
+++ b/tests/src/Functional/ViewUnpublishedMultilingualTest.php
@@ -23,7 +23,7 @@ class ViewUnpublishedMultilingualTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['view_unpublished', 'node', 'content_translation'];
+  protected static $modules = ['view_unpublished', 'node', 'content_translation'];
 
   /**
    * {@inheritdoc}
@@ -40,7 +40,7 @@ class ViewUnpublishedMultilingualTest extends BrowserTestBase {
   /**
    * Sets up the test.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Create Basic page node type.
@@ -80,7 +80,8 @@ class ViewUnpublishedMultilingualTest extends BrowserTestBase {
     $edit[$title_key] = $this->randomMachineName(8);
     $edit[$body_key] = $this->randomMachineName(16);
     $edit[$status_key] = 1;
-    $this->drupalPostForm('node/add/page', $edit, $this->t('Save'));
+    $this->drupalGet('node/add/page');
+    $this->submitForm($edit, $this->t('Save'));
 
     // Check the node language.
     $node = $this->getNodeByTitle($edit[$title_key]);
@@ -95,7 +96,8 @@ class ViewUnpublishedMultilingualTest extends BrowserTestBase {
     $this->drupalLogin($this->adminUser);
     $edit[$body_key] = $this->randomMachineName(16);
     $edit[$status_key] = 0;
-    $this->drupalPostForm($node->toUrl('edit-form'), $edit, $this->t('Save'));
+    $this->drupalGet($node->toUrl('edit-form'));
+    $this->submitForm($edit, $this->t('Save'));
     $this->drupalLogout();
     $this->drupalGet($node->toUrl());
     $this->assertSession()->statusCodeEquals(403);
@@ -109,7 +111,8 @@ class ViewUnpublishedMultilingualTest extends BrowserTestBase {
     $this->drupalLogin($this->adminUser);
     $edit[$body_key] = $this->randomMachineName(16);
     $edit[$status_key] = 1;
-    $this->drupalPostForm($node->toUrl('edit-form'), $edit, $this->t('Save'));
+    $this->drupalGet($node->toUrl('edit-form'));
+    $this->submitForm($edit, $this->t('Save'));
     $this->drupalLogout();
 
     // Anonymous users should have access.
@@ -129,7 +132,8 @@ class ViewUnpublishedMultilingualTest extends BrowserTestBase {
     $edit[$status_key] = 0;
     // Unpublish the node and now anonymous users should not have access.
     $edit[$status_key] = 0;
-    $this->drupalPostForm($add_translation_url, $edit, $this->t('Save (this translation)'));
+    $this->drupalGet($add_translation_url);
+    $this->submitForm($edit, $this->t('Save (this translation)'));
     // Reset the node so we pick up the translation.
     $node = $this->getNodeByTitle($edit[$title_key], TRUE);
     $this->drupalLogout();
diff --git a/tests/src/Functional/ViewUnpublishedViewsTest.php b/tests/src/Functional/ViewUnpublishedViewsTest.php
index f44640d..7150890 100644
--- a/tests/src/Functional/ViewUnpublishedViewsTest.php
+++ b/tests/src/Functional/ViewUnpublishedViewsTest.php
@@ -19,7 +19,7 @@ class ViewUnpublishedViewsTest extends BrowserTestBase {
    *
    * @var array
    */
-  public static $modules = ['view_unpublished', 'node', 'views'];
+  protected static $modules = ['view_unpublished', 'node', 'views'];
 
   /**
    * {@inheritdoc}
@@ -29,7 +29,7 @@ class ViewUnpublishedViewsTest extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Rebuild node access which we have to do after installing the module.
diff --git a/tests/src/Kernel/ViewUnpublishedDependencyTest.php b/tests/src/Kernel/ViewUnpublishedDependencyTest.php
index b43938a..f480ad0 100644
--- a/tests/src/Kernel/ViewUnpublishedDependencyTest.php
+++ b/tests/src/Kernel/ViewUnpublishedDependencyTest.php
@@ -17,7 +17,7 @@ class ViewUnpublishedDependencyTest extends KernelTestBase {
    *
    * @var array
    */
-  public static $modules = [
+  protected static $modules = [
     'field',
     'node',
     'system',
@@ -30,7 +30,7 @@ class ViewUnpublishedDependencyTest extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->installEntitySchema('user');
