diff --git a/src/Form/ForwardForm.php b/src/Form/ForwardForm.php
index 7cdfe59..dea1442 100644
--- a/src/Form/ForwardForm.php
+++ b/src/Form/ForwardForm.php
@@ -715,7 +715,7 @@ class ForwardForm extends FormBase implements BaseFormIdInterface {
     $uid = $this->currentUser()->id();
     $path = substr($entity->toUrl()->toString(), 1);
     $ip_address = $this->requestStack->getCurrentRequest()->getClientIp();
-    $timestamp = REQUEST_TIME;
+    $timestamp = \Drupal::time()->getRequestTime();
 
     // Insert into log.
     $this->database->insert('forward_log')
diff --git a/src/Services/ForwardLinkGenerator.php b/src/Services/ForwardLinkGenerator.php
index 16fdc69..d788b0d 100644
--- a/src/Services/ForwardLinkGenerator.php
+++ b/src/Services/ForwardLinkGenerator.php
@@ -96,7 +96,7 @@ class ForwardLinkGenerator implements ForwardLinkGeneratorInterface {
 
     $html = FALSE;
     // Output the correct style of link.
-    $default_icon = drupal_get_path('module', 'forward') . '/images/forward.gif';
+    $default_icon = \Drupal::service('extension.list.module')->getPath('forward') . '/images/forward.gif';
     $custom_icon = $settings['icon'];
     $link_style = $settings['style'];
     switch ($link_style) {
diff --git a/tests/src/Functional/ForwardFormTest.php b/tests/src/Functional/ForwardFormTest.php
index b0733af..8bfd718 100644
--- a/tests/src/Functional/ForwardFormTest.php
+++ b/tests/src/Functional/ForwardFormTest.php
@@ -17,9 +17,9 @@ class ForwardFormTest extends ForwardTestBase {
     $article = $this->drupalCreateNode(['type' => 'article']);
     $this->drupalLogin($this->forwardUser);
     $this->drupalGet('node/' . $article->id());
-    $this->assertText('Forward this article to a friend', 'The article has a Forward link.');
+    $this->assertSession()->pageTextContains('Forward this article to a friend');
     $this->drupalGet('/forward/node/' . $article->id());
-    $this->assertText('Forward this article to a friend', 'The Forward form displays for an article.');
+    $this->assertSession()->pageTextContains('Forward this article to a friend');
 
     // Submit the Forward form.
     $edit = [
@@ -27,8 +27,8 @@ class ForwardFormTest extends ForwardTestBase {
       'recipient' => 'test@test.com',
       'message' => 'This is a test personal message.',
     ];
-    $this->drupalPostForm(NULL, $edit, 'Send Message');
-    $this->assertText('Thank you for spreading the word about Drupal.', 'The Forward form displays a thank you message after submit.');
+    $this->submitForm($edit, 'Send Message');
+    $this->assertSession()->pageTextContains('Thank you for spreading the word about Drupal.');
 
     // Submit the Forward form without a recipient.
     $this->drupalGet('/forward/node/' . $article->id());
@@ -36,8 +36,8 @@ class ForwardFormTest extends ForwardTestBase {
       'name' => 'Test Forwarder',
       'message' => 'This is a test personal message.',
     ];
-    $this->drupalPostForm(NULL, $edit, 'Send Message');
-    $this->assertText('Send to field is required.', 'The Forward form displays an error message when the recipient is blank.');
+    $this->submitForm($edit, 'Send Message');
+    $this->assertSession()->pageTextContains('Send to field is required.');
 
     // Submit the Forward form without a personal message when required.
     $this->drupalLogin($this->adminUser);
@@ -45,15 +45,15 @@ class ForwardFormTest extends ForwardTestBase {
     $edit = [
       'forward_personal_message' => 2,
     ];
-    $this->drupalPostForm(NULL, $edit, 'Save configuration');
+    $this->submitForm($edit, 'Save configuration');
     $this->drupalLogin($this->forwardUser);
     $this->drupalGet('/forward/node/' . $article->id());
     $edit = [
       'name' => 'Test Forwarder',
       'recipient' => 'test@test.com',
     ];
-    $this->drupalPostForm(NULL, $edit, 'Send Message');
-    $this->assertText('Your personal message field is required.', 'The Forward form displays an error message when the message is blank and one is required.');
+    $this->submitForm($edit, 'Send Message');
+    $this->assertSession()->pageTextContains('Your personal message field is required.');
 
     // Submit the Forward form without a personal message when optional.
     $this->drupalLogin($this->adminUser);
@@ -61,15 +61,15 @@ class ForwardFormTest extends ForwardTestBase {
     $edit = [
       'forward_personal_message' => 1,
     ];
-    $this->drupalPostForm(NULL, $edit, 'Save configuration');
+    $this->submitForm($edit, 'Save configuration');
     $this->drupalLogin($this->forwardUser);
     $this->drupalGet('/forward/node/' . $article->id());
     $edit = [
       'name' => 'Test Forwarder',
       'recipient' => 'test@test.com',
     ];
-    $this->drupalPostForm(NULL, $edit, 'Send Message');
-    $this->assertNoText('Your personal message field is required.', 'The Forward form does not display an error message when the message is blank and optional.');
+    $this->submitForm($edit, 'Send Message');
+    $this->assertSession()->pageTextNotContains('Your personal message field is required.');
   }
 
 }
diff --git a/tests/src/Functional/ForwardTestBase.php b/tests/src/Functional/ForwardTestBase.php
index ee73cea..8357065 100644
--- a/tests/src/Functional/ForwardTestBase.php
+++ b/tests/src/Functional/ForwardTestBase.php
@@ -45,7 +45,7 @@ abstract class ForwardTestBase extends BrowserTestBase {
   /**
    * Perform any initial set up tasks that run before every test method.
    */
-  protected function setUp() {
+  protected function setUp(): void {
     parent::setUp();
 
     // Create Basic page and Article node types.
diff --git a/tests/src/Functional/PermissionsTest.php b/tests/src/Functional/PermissionsTest.php
index abed4d2..e3b693d 100644
--- a/tests/src/Functional/PermissionsTest.php
+++ b/tests/src/Functional/PermissionsTest.php
@@ -16,30 +16,30 @@ class PermissionsTest extends ForwardTestBase {
     // Users with access content permission cannot change settings.
     $this->drupalLogin($this->webUser);
     $this->drupalGet('admin/config/user-interface/forward');
-    $this->assertResponse(403, 'Users with access content permission cannot change settings.');
+    $this->assertSession()->statusCodeEquals(403, 'Users with access content permission cannot change settings.');
 
     // Users with access forward permission cannot change settings.
     $this->drupalLogin($this->forwardUser);
     $this->drupalGet('admin/config/user-interface/forward');
-    $this->assertResponse(403, 'Users with access forward permission cannot change settings.');
+    $this->assertSession()->statusCodeEquals(403, 'Users with access forward permission cannot change settings.');
 
     // Users with administer forward permission can change settings.
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/config/user-interface/forward');
-    $this->assertResponse(200, 'Users with administer forward permission can change settings.');
+    $this->assertSession()->statusCodeEquals(200, 'Users with administer forward permission can change settings.');
 
     // Users without override email address permission cannot change their email address on the Forward form.
     $article = $this->drupalCreateNode(['type' => 'article']);
     $this->drupalLogin($this->forwardUser);
     $this->drupalGet('/forward/node/' . $article->id());
-    $this->assertNoText('Your email address', 'Users without override email address permission cannot change their email address on the Forward form.');
+    $this->assertSession()->pageTextNotContains('Your email address');
 
     // Users with override email address permission can change their email address on the Forward form.
     $overrideUser = $this->drupalCreateUser(['access content', 'access forward', 'override email address', 'override flood control']);
     $article = $this->drupalCreateNode(['type' => 'article']);
     $this->drupalLogin($overrideUser);
     $this->drupalGet('/forward/node/' . $article->id());
-    $this->assertText('Your email address', 'Users with override email address permission can change their email address on the Forward form.');
+    $this->assertSession()->pageTextContains('Your email address');
 
     // Set flood control limit to 1.
     $this->drupalLogin($this->adminUser);
@@ -47,7 +47,7 @@ class PermissionsTest extends ForwardTestBase {
     $edit = [
       'forward_flood_control_limit' => 1,
     ];
-    $this->drupalPostForm(NULL, $edit, 'Save configuration');
+    $this->submitForm($edit, 'Save configuration');
 
     // Users without override flood control permission cannot do more than 1 forward in an hour.
     $this->drupalLogin($this->forwardUser);
@@ -57,15 +57,15 @@ class PermissionsTest extends ForwardTestBase {
       'recipient' => 'test@test.com',
       'message' => 'This is a test personal message.',
     ];
-    $this->drupalPostForm(NULL, $edit, 'Send Message');
+    $this->submitForm($edit, 'Send Message');
     $this->drupalGet('/forward/node/' . $article->id());
     $edit = [
       'name' => 'Test Forwarder',
       'recipient' => 'test@test.com',
       'message' => 'This is a test personal message.',
     ];
-    $this->drupalPostForm(NULL, $edit, 'Send Message');
-    $this->assertNoText('Thank you for spreading the word about Drupal.', 'Users without override flood control permission cannot do more than 1 forward in an hour.');
+    $this->submitForm($edit, 'Send Message');
+    $this->assertSession()->pageTextNotContains('Thank you for spreading the word about Drupal.');
 
     // Users with override flood control permission can do more than 1 forward in an hour.
     $this->drupalLogin($overrideUser);
@@ -75,15 +75,15 @@ class PermissionsTest extends ForwardTestBase {
       'recipient' => 'test@test.com',
       'message' => 'This is a test personal message.',
     ];
-    $this->drupalPostForm(NULL, $edit, 'Send Message');
+    $this->submitForm($edit, 'Send Message');
     $this->drupalGet('/forward/node/' . $article->id());
     $edit = [
       'name' => 'Test Forwarder',
       'recipient' => 'test@test.com',
       'message' => 'This is a test personal message.',
     ];
-    $this->drupalPostForm(NULL, $edit, 'Send Message');
-    $this->assertText('Thank you for spreading the word about Drupal.', 'Users with override flood control permission can do more than 1 forward in an hour.');
+    $this->submitForm($edit, 'Send Message');
+    $this->assertSession()->pageTextContains('Thank you for spreading the word about Drupal.');
   }
 
 }
