diff --git a/tests/src/Functional/FixedBlockAdminTest.php b/tests/src/Functional/FixedBlockAdminTest.php
index e93b50b..f0ef935 100644
--- a/tests/src/Functional/FixedBlockAdminTest.php
+++ b/tests/src/Functional/FixedBlockAdminTest.php
@@ -26,7 +26,7 @@ class FixedBlockAdminTest extends FunctionalFixedBlockTestBase {
   /**
    * {@inheritdoc}
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     // Create and log in an administrative user.
@@ -68,9 +68,9 @@ class FixedBlockAdminTest extends FunctionalFixedBlockTestBase {
     $this->clickLink('Custom block library');
     $this->clickLink('Fixed blocks');
     $this->clickLink('Restore default content');
-    $this->assertText('Are you sure you want to restore the Basic fixed to its default content?');
+    $this->assertSession()->pageTextContains('Are you sure you want to restore the Basic fixed to its default content?');
     // Confirm the form.
-    $this->drupalPostForm(NULL, [], 'Confirm');
+    $this->submitForm([], 'Confirm');
     $block_content = $this->fixedBlock->getBlockContent(FALSE);
     // The block content must be created.
     $this->assertNotNull($block_content);
@@ -95,9 +95,9 @@ class FixedBlockAdminTest extends FunctionalFixedBlockTestBase {
     $this->clickLink('Custom block library');
     $this->clickLink('Fixed blocks');
     $this->clickLink('Set contents as default');
-    $this->assertText('Are you sure you want to set the Basic fixed current content as the default?');
+    $this->assertSession()->pageTextContains('Are you sure you want to set the Basic fixed current content as the default?');
     // Confirm the form.
-    $this->drupalPostForm(NULL, [], 'Confirm');
+    $this->submitForm([], 'Confirm');
     // Update the fixed block content object.
     $this->fixedBlock = $this->container->get('entity_type.manager')
       ->getStorage('fixed_block_content')->load('basic_fixed');
@@ -123,8 +123,8 @@ class FixedBlockAdminTest extends FunctionalFixedBlockTestBase {
 
     // Go to export (restore) block with the default content page.
     $this->drupalGet('admin/structure/block/block-content/fixed-block-content/manage/basic_fixed/export');
-    $this->assertText('Are you sure you want to restore the Basic fixed to its default content?');
-    $this->drupalPostForm(NULL, [], 'Confirm');
+    $this->assertSession()->pageTextContains('Are you sure you want to restore the Basic fixed to its default content?');
+    $this->submitForm([], 'Confirm');
 
     // A new block must has been created.
     $block_content = $this->fixedBlock->getBlockContent(FALSE);
@@ -147,9 +147,9 @@ class FixedBlockAdminTest extends FunctionalFixedBlockTestBase {
     // Go to export (restore) block with the default content page.
     $this->drupalGet('admin/structure/block/block-content/fixed-block-content/manage/basic_fixed/export');
     // The update existing option must be present.
-    $this->assertText('Update the existing block content');
+    $this->assertSession()->pageTextContains('Update the existing block content');
     // Proceed enabling the update existing option.
-    $this->drupalPostForm(NULL, ['update_existing' => TRUE], 'Confirm');
+    $this->submitForm(['update_existing' => TRUE], 'Confirm');
 
     // The block content must be the same as the previously existing.
     $new_block_content = $this->fixedBlock->getBlockContent(FALSE);
@@ -173,12 +173,12 @@ class FixedBlockAdminTest extends FunctionalFixedBlockTestBase {
     $this->drupalGet('admin/structure/block/block-content/fixed-block-content');
     $this->clickLink('Delete');
     // The "Delete the linked custom block as well" must be present in the form.
-    $this->assertText('Delete the linked custom block as well');
+    $this->assertSession()->pageTextContains('Delete the linked custom block as well');
     // Enable it.
     $edit = ['delete_linked_block' => TRUE];
     // Confirm the form.
-    $this->drupalPostForm(NULL, $edit, 'Delete');
-    $this->assertText('The fixed block content Basic fixed has been deleted.');
+    $this->submitForm($edit, 'Delete');
+    $this->assertSession()->pageTextContains('The fixed block content Basic fixed has been deleted.');
 
     // Test that the fixed block content was deleted.
     $this->fixedBlock = $this->container->get('entity_type.manager')
diff --git a/tests/src/Functional/FunctionalFixedBlockTestBase.php b/tests/src/Functional/FunctionalFixedBlockTestBase.php
index ef0dbd8..d740e02 100644
--- a/tests/src/Functional/FunctionalFixedBlockTestBase.php
+++ b/tests/src/Functional/FunctionalFixedBlockTestBase.php
@@ -38,7 +38,7 @@ abstract class FunctionalFixedBlockTestBase extends BrowserTestBase {
   /**
    * {@inheritdoc}
    */
-  public function setUp() {
+  public function setUp(): void {
     parent::setUp();
 
     // Create a content block type.
diff --git a/tests/src/Kernel/AutoExportTest.php b/tests/src/Kernel/AutoExportTest.php
index d181982..5905e1b 100644
--- a/tests/src/Kernel/AutoExportTest.php
+++ b/tests/src/Kernel/AutoExportTest.php
@@ -23,7 +23,7 @@ class AutoExportTest extends FixedBlockContentKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Export the initial config, including fixed blocks from the test module.
@@ -88,15 +88,15 @@ class AutoExportTest extends FixedBlockContentKernelTestBase {
 
     // Check that there is no changes in the block content linked to the test
     // fixed block with the auto-export option disabled.
-    $this->assertEqual($fixed_blocks['test_auto_export_disabled']->getBlockContent(FALSE), $block_contents['test_auto_export_disabled']);
+    $this->assertEquals($fixed_blocks['test_auto_export_disabled']->getBlockContent(FALSE), $block_contents['test_auto_export_disabled']);
 
     // Check that the fixed block with the auto-export on empty option
     // has no changes.
-    $this->assertEqual($fixed_blocks['auto_export_on_empty']->getBlockContent(FALSE), $block_contents['auto_export_on_empty']);
+    $this->assertEquals($fixed_blocks['auto_export_on_empty']->getBlockContent(FALSE), $block_contents['auto_export_on_empty']);
 
     // Check that the fixed block with the auto-export always option
     // has a block content linked.
-    $this->assertNotEqual($fixed_blocks['auto_export_always']->getBlockContent(FALSE), $block_contents['auto_export_always']);
+    $this->assertNotEquals($fixed_blocks['auto_export_always']->getBlockContent(FALSE), $block_contents['auto_export_always']);
   }
 
 }
diff --git a/tests/src/Kernel/DefaultContentTest.php b/tests/src/Kernel/DefaultContentTest.php
index c22aeb5..d63bcba 100644
--- a/tests/src/Kernel/DefaultContentTest.php
+++ b/tests/src/Kernel/DefaultContentTest.php
@@ -26,7 +26,7 @@ class DefaultContentTest extends FixedBlockContentKernelTestBase {
     $block_content = $this->fixedBlock->getBlockContent(FALSE);
     $this->assertNotNull($block_content);
     // Test that it is a new block content.
-    $this->assertEqual($block_content->id(), 1);
+    $this->assertEquals($block_content->id(), 1);
 
     // Tests that the default content export updates existing block content.
     $block_content->get('body')->setValue('To be overridden.');
@@ -34,7 +34,7 @@ class DefaultContentTest extends FixedBlockContentKernelTestBase {
     $this->fixedBlock->exportDefaultContent(TRUE);
     $block_content = $this->fixedBlock->getBlockContent(FALSE);
     // Must be the same block content.
-    $this->assertEqual($block_content->id(), 1);
+    $this->assertEquals($block_content->id(), 1);
     // The body must be empty, as it is in the default content.
     $this->assertTrue($block_content->get('body')->isEmpty());
 
@@ -45,9 +45,9 @@ class DefaultContentTest extends FixedBlockContentKernelTestBase {
     $this->fixedBlock->exportDefaultContent();
     $block_content = $this->fixedBlock->getBlockContent(FALSE);
     // It must be a new block content.
-    $this->assertEqual($block_content->id(), 2);
+    $this->assertEquals($block_content->id(), 2);
     // Tests that the default content was correctly exported.
-    $this->assertEqual($block_content->get('body')->getString(), $test_content);
+    $this->assertEquals($block_content->get('body')->getString(), $test_content);
   }
 
   /**
diff --git a/tests/src/Kernel/FixedBlockContentKernelTestBase.php b/tests/src/Kernel/FixedBlockContentKernelTestBase.php
index 4e291ec..f6b57a5 100644
--- a/tests/src/Kernel/FixedBlockContentKernelTestBase.php
+++ b/tests/src/Kernel/FixedBlockContentKernelTestBase.php
@@ -58,7 +58,7 @@ abstract class FixedBlockContentKernelTestBase extends KernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     $this->entityTypeManager = $this->container->get('entity_type.manager');
diff --git a/tests/src/Kernel/FixedToContentMappingTest.php b/tests/src/Kernel/FixedToContentMappingTest.php
index 5cbe9dd..f69ee2f 100644
--- a/tests/src/Kernel/FixedToContentMappingTest.php
+++ b/tests/src/Kernel/FixedToContentMappingTest.php
@@ -26,7 +26,7 @@ class FixedToContentMappingTest extends FixedBlockContentKernelTestBase {
   /**
    * {@inheritdoc}
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
     $this->mappingHandler = $this->entityTypeManager->getHandler('fixed_block_content', 'mapping_handler');
     // Create a simple block content to work with it.
