From 8e4d6562e7d22a0dea3f6a7d86f9315489421086 Mon Sep 17 00:00:00 2001
From: Brian Canini <canini.16@osu.edu>
Date: Thu, 1 Apr 2021 11:29:31 -0400
Subject: [PATCH] Updating drupal/honeypot (1.30.0 => 2.0.0)

---
 composer.json                                 |  2 +-
 composer.lock                                 | 26 +++++++++----------
 vendor/composer/installed.json                | 26 +++++++++----------
 web/modules/honeypot/.travis.yml              |  2 +-
 web/modules/honeypot/composer.json            | 10 +++++--
 web/modules/honeypot/docker-compose.yml       |  1 +
 web/modules/honeypot/honeypot.info.yml        |  7 ++---
 web/modules/honeypot/honeypot.install         |  1 -
 web/modules/honeypot/honeypot.module          |  8 +++---
 .../honeypot_test/honeypot_test.info.yml      |  8 +++---
 .../src/Controller/HoneypotTestController.php |  5 +++-
 .../src/Functional/HoneypotAdminFormTest.php  | 13 ++++++----
 .../tests/src/Functional/HoneypotFormTest.php | 26 ++++++++++---------
 13 files changed, 73 insertions(+), 62 deletions(-)

diff --git a/composer.json b/composer.json
index 6cbab83069..9c81b7b38b 100644
--- a/composer.json
+++ b/composer.json
@@ -129,7 +129,7 @@
         "drupal/geolocation": "1.10",
         "drupal/google_analytics": "2.5",
         "drupal/google_tag": "1.4",
-        "drupal/honeypot": "1.30",
+        "drupal/honeypot": "2.0",
         "drupal/image_popup": "1.1",
         "drupal/inline_entity_form": "1.0-rc8",
         "drupal/libraries": "3.0-beta1",
diff --git a/composer.lock b/composer.lock
index dbbccb9f01..26adccb92c 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
         "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
         "This file is @generated automatically"
     ],
-    "content-hash": "3e92f2c0ff2c82016b011d0962b739ff",
+    "content-hash": "bd9eb7f11eb9a9e34136bb4fe68ba83b",
     "packages": [
         {
             "name": "alchemy/zippy",
@@ -5284,29 +5284,26 @@
         },
         {
             "name": "drupal/honeypot",
-            "version": "1.30.0",
+            "version": "2.0.0",
             "source": {
                 "type": "git",
                 "url": "https://git.drupalcode.org/project/honeypot.git",
-                "reference": "8.x-1.30"
+                "reference": "2.0.0"
             },
             "dist": {
                 "type": "zip",
-                "url": "https://ftp.drupal.org/files/projects/honeypot-8.x-1.30.zip",
-                "reference": "8.x-1.30",
-                "shasum": "1d7983e8e07feee4f13e4b05c9a10db15ae2097e"
+                "url": "https://ftp.drupal.org/files/projects/honeypot-2.0.0.zip",
+                "reference": "2.0.0",
+                "shasum": "6f8701f5be173595318e6afe9ff744edb324f85c"
             },
             "require": {
-                "drupal/core": "~8.0"
+                "drupal/core": "^8.0 || ^9.0"
             },
             "type": "drupal-module",
             "extra": {
-                "branch-alias": {
-                    "dev-1.x": "1.x-dev"
-                },
                 "drupal": {
-                    "version": "8.x-1.30",
-                    "datestamp": "1576274288",
+                    "version": "2.0.0",
+                    "datestamp": "1588105107",
                     "security-coverage": {
                         "status": "covered",
                         "message": "Covered by Drupal's security advisory policy"
@@ -5318,7 +5315,7 @@
             },
             "notification-url": "https://packages.drupal.org/8/downloads",
             "license": [
-                "GPL-2.0+"
+                "GPL-2.0-or-later"
             ],
             "authors": [
                 {
@@ -5346,7 +5343,8 @@
                 "spam"
             ],
             "support": {
-                "source": "https://git.drupalcode.org/project/honeypot"
+                "source": "https://git.drupalcode.org/project/honeypot",
+                "issues": "https://www.drupal.org/project/issues/honeypot"
             }
         },
         {
diff --git a/vendor/composer/installed.json b/vendor/composer/installed.json
index ebcc3b32e9..3dcf95d090 100644
--- a/vendor/composer/installed.json
+++ b/vendor/composer/installed.json
@@ -5442,30 +5442,27 @@
     },
     {
         "name": "drupal/honeypot",
-        "version": "1.30.0",
-        "version_normalized": "1.30.0.0",
+        "version": "2.0.0",
+        "version_normalized": "2.0.0.0",
         "source": {
             "type": "git",
             "url": "https://git.drupalcode.org/project/honeypot.git",
-            "reference": "8.x-1.30"
+            "reference": "2.0.0"
         },
         "dist": {
             "type": "zip",
-            "url": "https://ftp.drupal.org/files/projects/honeypot-8.x-1.30.zip",
-            "reference": "8.x-1.30",
-            "shasum": "1d7983e8e07feee4f13e4b05c9a10db15ae2097e"
+            "url": "https://ftp.drupal.org/files/projects/honeypot-2.0.0.zip",
+            "reference": "2.0.0",
+            "shasum": "6f8701f5be173595318e6afe9ff744edb324f85c"
         },
         "require": {
-            "drupal/core": "~8.0"
+            "drupal/core": "^8.0 || ^9.0"
         },
         "type": "drupal-module",
         "extra": {
-            "branch-alias": {
-                "dev-1.x": "1.x-dev"
-            },
             "drupal": {
-                "version": "8.x-1.30",
-                "datestamp": "1576274288",
+                "version": "2.0.0",
+                "datestamp": "1588105107",
                 "security-coverage": {
                     "status": "covered",
                     "message": "Covered by Drupal's security advisory policy"
@@ -5478,7 +5475,7 @@
         "installation-source": "dist",
         "notification-url": "https://packages.drupal.org/8/downloads",
         "license": [
-            "GPL-2.0+"
+            "GPL-2.0-or-later"
         ],
         "authors": [
             {
@@ -5506,7 +5503,8 @@
             "spam"
         ],
         "support": {
-            "source": "https://git.drupalcode.org/project/honeypot"
+            "source": "https://git.drupalcode.org/project/honeypot",
+            "issues": "https://www.drupal.org/project/issues/honeypot"
         }
     },
     {
diff --git a/web/modules/honeypot/.travis.yml b/web/modules/honeypot/.travis.yml
index 843a0e3295..f5d52a0354 100644
--- a/web/modules/honeypot/.travis.yml
+++ b/web/modules/honeypot/.travis.yml
@@ -25,7 +25,7 @@ install:
   # Structure the codebase and install necessary dependencies.
   - docker-compose exec drupal bash -c 'apt-get update && apt-get install -y sudo'
   - docker-compose exec drupal bash -c 'composer config platform --unset'
-  - docker-compose exec drupal bash -c 'composer require --dev drush/drush'
+  - docker-compose exec drupal bash -c 'composer require --prefer-source --no-interaction --dev drush/drush'
   - docker-compose exec drupal bash -c 'composer update phpunit/phpunit symfony/phpunit-bridge phpspec/prophecy symfony/yaml --with-dependencies'
   - docker-compose exec drupal ln -s /opt/honeypot/ /var/www/html/web/modules/honeypot
 
diff --git a/web/modules/honeypot/composer.json b/web/modules/honeypot/composer.json
index c8d3096344..7ee3c1b8f5 100644
--- a/web/modules/honeypot/composer.json
+++ b/web/modules/honeypot/composer.json
@@ -2,7 +2,7 @@
   "name": "drupal/honeypot",
   "description": "Mitigates spam form submissions using the honeypot method.",
   "type": "drupal-module",
-  "license": "GPL-2.0+",
+  "license": "GPL-2.0-or-later",
   "keywords": ["spam", "php", "form", "honeypot", "honeytrap", "deterrent"],
   "homepage": "https://www.drupal.org/project/honeypot",
   "minimum-stability": "dev",
@@ -12,5 +12,11 @@
       "email": "geerlingguy@mac.com"
     }
   ],
-  "require": { }
+  "support": {
+    "issues": "https://www.drupal.org/project/issues/honeypot",
+    "source": "https://git.drupalcode.org/project/honeypot"
+  },
+  "require": {
+      "drupal/core": "^8.0 || ^9.0"
+    }
 }
diff --git a/web/modules/honeypot/docker-compose.yml b/web/modules/honeypot/docker-compose.yml
index 1b07b5c036..3179e0438b 100644
--- a/web/modules/honeypot/docker-compose.yml
+++ b/web/modules/honeypot/docker-compose.yml
@@ -15,6 +15,7 @@ services:
       DRUPAL_DOWNLOAD_METHOD: 'composer'
       DRUPAL_PROJECT_ROOT: /var/www/html
       APACHE_DOCUMENT_ROOT: /var/www/html/web
+      COMPOSER_MEMORY_LIMIT: '-1'
     ports:
       - "80:80"
     restart: always
diff --git a/web/modules/honeypot/honeypot.info.yml b/web/modules/honeypot/honeypot.info.yml
index 177d30a611..fb5f1d0615 100644
--- a/web/modules/honeypot/honeypot.info.yml
+++ b/web/modules/honeypot/honeypot.info.yml
@@ -3,10 +3,11 @@ type: module
 description: 'Mitigates spam form submissions using the honeypot method.'
 package: "Spam control"
 core: 8.x
+core_version_requirement: ^8 || ^9
 configure: honeypot.config
 hidden: false
 
-# Information added by Drupal.org packaging script on 2019-12-13
-version: '8.x-1.30'
+# Information added by Drupal.org packaging script on 2020-04-28
+version: '2.0.0'
 project: 'honeypot'
-datestamp: 1576274291
+datestamp: 1588105109
diff --git a/web/modules/honeypot/honeypot.install b/web/modules/honeypot/honeypot.install
index dab3049138..33ed67abcf 100644
--- a/web/modules/honeypot/honeypot.install
+++ b/web/modules/honeypot/honeypot.install
@@ -6,7 +6,6 @@
  */
 
 use Drupal\Core\Url;
-use Drupal\Core\Link;
 
 /**
  * Implements hook_schema().
diff --git a/web/modules/honeypot/honeypot.module b/web/modules/honeypot/honeypot.module
index 1f2d7e94b3..b54fd28ca5 100644
--- a/web/modules/honeypot/honeypot.module
+++ b/web/modules/honeypot/honeypot.module
@@ -23,7 +23,7 @@ function honeypot_help($route_name, RouteMatchInterface $route_match) {
       $output .= '<dt>' . t('Configuring Honeypot') . '</dt>';
       $output .= '<dd>' . t('All settings for this module are on the Honeypot configuration page, under the Configuration section, in the Content authoring settings. You can visit the configuration page directly from the Honeypot configuration link below. The configuration settings are described in the <a href=":url">online documentation for the Honeypot module</a>.', [':url' => 'https://www.drupal.org/docs/8/modules/honeypot/using-honeypot']) . '</dd>';
       $output .= '<dt>' . t('Setting up Honeypot in your own forms') . '</dt>';
-      $output .= '<dd>' . t('Honeypot protection can be bypassed for certain user roles. For instance, site administrators, who just might be able to fill out a form in less than 5 seconds.  And, Honeypot protection can be enabled only for certain forms. Or, it can protect all forms on the site. Finally, honeypot protection can be used in any of your own forms by simply including a little code snippet included on the module\'s project page.') . '</dd>';
+      $output .= '<dd>' . t("Honeypot protection can be bypassed for certain user roles. For instance, site administrators, who just might be able to fill out a form in less than 5 seconds.  And, Honeypot protection can be enabled only for certain forms. Or, it can protect all forms on the site. Finally, honeypot protection can be used in any of your own forms by simply including a little code snippet included on the module's project page.") . '</dd>';
       $output .= '</dl>';
       return $output;
   }
@@ -140,7 +140,7 @@ function honeypot_add_form_protection(&$form, FormStateInterface $form_state, ar
     $honeypot_class = $honeypot_element . '-textfield';
     $form[$honeypot_element] = [
       '#theme_wrappers' => [
-        'form_element',
+        0 => 'form_element',
         'container' => [
           '#id' => NULL,
           '#attributes' => [
@@ -169,7 +169,7 @@ function honeypot_add_form_protection(&$form, FormStateInterface $form_state, ar
     $input = $form_state->getUserInput();
     if (empty($input['honeypot_time'])) {
       $identifier = Crypt::randomBytesBase64();
-      \Drupal::service('keyvalue.expirable')->get('honeypot_time_restriction')->setWithExpire($identifier, time(), 3600*24);
+      \Drupal::service('keyvalue.expirable')->get('honeypot_time_restriction')->setWithExpire($identifier, time(), 3600 * 24);
     }
     else {
       $identifier = $input['honeypot_time'];
@@ -241,7 +241,7 @@ function _honeypot_time_restriction_validate($element, FormStateInterface $form_
   if (!$honeypot_time || \Drupal::time()->getRequestTime() < ($honeypot_time + $time_limit)) {
     _honeypot_log($form_state->getValue('form_id'), 'honeypot_time');
     $time_limit = honeypot_get_time_limit();
-    \Drupal::service('keyvalue.expirable')->get('honeypot_time_restriction')->setWithExpire($identifier, \Drupal::time()->getRequestTime(), 3600*24);
+    \Drupal::service('keyvalue.expirable')->get('honeypot_time_restriction')->setWithExpire($identifier, \Drupal::time()->getRequestTime(), 3600 * 24);
     $form_state->setErrorByName('', t('There was a problem with your form submission. Please wait @limit seconds and try again.', ['@limit' => $time_limit]));
   }
 }
diff --git a/web/modules/honeypot/tests/modules/honeypot_test/honeypot_test.info.yml b/web/modules/honeypot/tests/modules/honeypot_test/honeypot_test.info.yml
index e4c0669576..2c19070ece 100644
--- a/web/modules/honeypot/tests/modules/honeypot_test/honeypot_test.info.yml
+++ b/web/modules/honeypot/tests/modules/honeypot_test/honeypot_test.info.yml
@@ -1,11 +1,11 @@
-name: honeypot_test
+name: Honeypot Test
 type: module
 description: Support module for Honeypot internal testing purposes.
 core: 8.x
 package: Testing
 hidden: true
 
-# Information added by Drupal.org packaging script on 2019-12-13
-version: '8.x-1.30'
+# Information added by Drupal.org packaging script on 2020-04-28
+version: '2.0.0'
 project: 'honeypot'
-datestamp: 1576274291
+datestamp: 1588105109
diff --git a/web/modules/honeypot/tests/modules/honeypot_test/src/Controller/HoneypotTestController.php b/web/modules/honeypot/tests/modules/honeypot_test/src/Controller/HoneypotTestController.php
index 61c1564b65..56844615b2 100644
--- a/web/modules/honeypot/tests/modules/honeypot_test/src/Controller/HoneypotTestController.php
+++ b/web/modules/honeypot/tests/modules/honeypot_test/src/Controller/HoneypotTestController.php
@@ -4,12 +4,15 @@
 
 use Drupal\Core\Form\FormState;
 use Symfony\Component\HttpFoundation\JsonResponse;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
 
 /**
  * Controller for honeypot_test routes.
  */
 class HoneypotTestController {
 
+  use StringTranslationTrait;
+
   /**
    * Page that triggers a programmatic form submission.
    *
@@ -20,7 +23,7 @@ public function submitFormPage() {
     $values = [
       'name' => 'robo-user',
       'mail' => 'robouser@example.com',
-      'op' => t('Submit'),
+      'op' => $this->t('Submit'),
     ];
     $form_state->setValues($values);
     \Drupal::formBuilder()->submitForm('\Drupal\user\Form\UserPasswordForm', $form_state);
diff --git a/web/modules/honeypot/tests/src/Functional/HoneypotAdminFormTest.php b/web/modules/honeypot/tests/src/Functional/HoneypotAdminFormTest.php
index 9ae49479ff..e46d2b7800 100644
--- a/web/modules/honeypot/tests/src/Functional/HoneypotAdminFormTest.php
+++ b/web/modules/honeypot/tests/src/Functional/HoneypotAdminFormTest.php
@@ -3,6 +3,7 @@
 namespace Drupal\Tests\honeypot\Functional;
 
 use Drupal\Tests\BrowserTestBase;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
 
 /**
  * Test Honeypot spam protection admin form functionality.
@@ -11,6 +12,8 @@
  */
 class HoneypotAdminFormTest extends BrowserTestBase {
 
+  use StringTranslationTrait;
+
   /**
    * Admin user.
    *
@@ -55,14 +58,14 @@ public function testElementNameUpdateSuccess() {
 
     // Set up form and submit it.
     $edit['element_name'] = "test";
-    $this->drupalPostForm('admin/config/content/honeypot', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/config/content/honeypot', $edit, $this->t('Save configuration'));
 
     // Form should have been submitted successfully.
     $this->assertSession()->pageTextContains('The configuration options have been saved.');
 
     // Set up form and submit it.
     $edit['element_name'] = "test-1";
-    $this->drupalPostForm('admin/config/content/honeypot', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/config/content/honeypot', $edit, $this->t('Save configuration'));
 
     // Form should have been submitted successfully.
     $this->assertSession()->pageTextContains('The configuration options have been saved.');
@@ -77,7 +80,7 @@ public function testElementNameUpdateFirstCharacterFail() {
 
     // Set up form and submit it.
     $edit['element_name'] = "1test";
-    $this->drupalPostForm('admin/config/content/honeypot', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/config/content/honeypot', $edit, $this->t('Save configuration'));
 
     // Form submission should fail.
     $this->assertSession()->pageTextContains('The element name must start with a letter.');
@@ -92,14 +95,14 @@ public function testElementNameUpdateInvalidCharacterFail() {
 
     // Set up form and submit it.
     $edit['element_name'] = "special-character-&";
-    $this->drupalPostForm('admin/config/content/honeypot', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/config/content/honeypot', $edit, $this->t('Save configuration'));
 
     // Form submission should fail.
     $this->assertSession()->pageTextContains('The element name cannot contain spaces or other special characters.');
 
     // Set up form and submit it.
     $edit['element_name'] = "space in name";
-    $this->drupalPostForm('admin/config/content/honeypot', $edit, t('Save configuration'));
+    $this->drupalPostForm('admin/config/content/honeypot', $edit, $this->t('Save configuration'));
 
     // Form submission should fail.
     $this->assertSession()->pageTextContains('The element name cannot contain spaces or other special characters.');
diff --git a/web/modules/honeypot/tests/src/Functional/HoneypotFormTest.php b/web/modules/honeypot/tests/src/Functional/HoneypotFormTest.php
index e96ccaab9d..0477d50d46 100644
--- a/web/modules/honeypot/tests/src/Functional/HoneypotFormTest.php
+++ b/web/modules/honeypot/tests/src/Functional/HoneypotFormTest.php
@@ -5,6 +5,7 @@
 use Drupal\comment\Tests\CommentTestTrait;
 use Drupal\comment\Plugin\Field\FieldType\CommentItemInterface;
 use Drupal\contact\Entity\ContactForm;
+use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\Tests\BrowserTestBase;
 use Drupal\user\UserInterface;
 
@@ -16,6 +17,7 @@
 class HoneypotFormTest extends BrowserTestBase {
 
   use CommentTestTrait;
+  use StringTranslationTrait;
 
   /**
    * Admin user.
@@ -124,7 +126,7 @@ public function testProtectRegisterUserNormal() {
     // Set up form and submit it.
     $edit['name'] = $this->randomMachineName();
     $edit['mail'] = $edit['name'] . '@example.com';
-    $this->drupalPostForm('user/register', $edit, t('Create new account'));
+    $this->drupalPostForm('user/register', $edit, $this->t('Create new account'));
 
     // Form should have been submitted successfully.
     $this->assertSession()->pageTextContains('A welcome message with further instructions has been sent to your email address.');
@@ -138,7 +140,7 @@ public function testProtectUserRegisterHoneypotFilled() {
     $edit['name'] = $this->randomMachineName();
     $edit['mail'] = $edit['name'] . '@example.com';
     $edit['url'] = 'http://www.example.com/';
-    $this->drupalPostForm('user/register', $edit, t('Create new account'));
+    $this->drupalPostForm('user/register', $edit, $this->t('Create new account'));
 
     // Form should have error message.
     $this->assertSession()->pageTextContains('There was a problem with your form submission. Please refresh the page and try again.');
@@ -155,8 +157,8 @@ public function testProtectRegisterUserTooFast() {
     $edit['mail'] = $edit['name'] . '@example.com';
     $this->drupalGet('user/register');
     sleep(2);
-    $this->drupalPostForm(NULL, $edit, t('Create new account'));
-    $this->assertNoText(t('There was a problem with your form submission.'));
+    $this->drupalPostForm(NULL, $edit, $this->t('Create new account'));
+    $this->assertNoText($this->t('There was a problem with your form submission.'));
 
     // Set the time limit a bit higher so we can trigger honeypot.
     \Drupal::configFactory()->getEditable('honeypot.settings')->set('time_limit', 5)->save();
@@ -164,7 +166,7 @@ public function testProtectRegisterUserTooFast() {
     // Set up form and submit it.
     $edit['name'] = $this->randomMachineName();
     $edit['mail'] = $edit['name'] . '@example.com';
-    $this->drupalPostForm('user/register', $edit, t('Create new account'));
+    $this->drupalPostForm('user/register', $edit, $this->t('Create new account'));
 
     // Form should have error message.
     $this->assertSession()->pageTextContains('There was a problem with your form submission. Please wait 6 seconds and try again.');
@@ -181,8 +183,8 @@ public function testStrictEmptinessOnHoneypotField() {
     // Any value that is not strictly empty should trigger Honeypot.
     foreach (['0', ' '] as $value) {
       $edit['url'] = $value;
-      $this->drupalPostForm('user/register', $edit, t('Create new account'));
-      $this->assertText(t('There was a problem with your form submission. Please refresh the page and try again.'), "Honeypot protection is triggered when the honeypot field contains '{$value}'.");
+      $this->drupalPostForm('user/register', $edit, $this->t('Create new account'));
+      $this->assertText($this->t('There was a problem with your form submission. Please refresh the page and try again.'), "Honeypot protection is triggered when the honeypot field contains '{$value}'.");
     }
   }
 
@@ -200,7 +202,7 @@ public function testProtectCommentFormNormal() {
 
     // Set up form and submit it.
     $edit["comment_body[0][value]"] = $comment;
-    $this->drupalPostForm('comment/reply/node/' . $this->node->id() . '/comment', $edit, t('Save'));
+    $this->drupalPostForm('comment/reply/node/' . $this->node->id() . '/comment', $edit, $this->t('Save'));
     $this->assertSession()->pageTextContains('Your comment has been queued for review');
   }
 
@@ -216,7 +218,7 @@ public function testProtectCommentFormHoneypotFilled() {
     // Set up form and submit it.
     $edit["comment_body[0][value]"] = $comment;
     $edit['url'] = 'http://www.example.com/';
-    $this->drupalPostForm('comment/reply/node/' . $this->node->id() . '/comment', $edit, t('Save'));
+    $this->drupalPostForm('comment/reply/node/' . $this->node->id() . '/comment', $edit, $this->t('Save'));
     $this->assertSession()->pageTextContains('There was a problem with your form submission. Please refresh the page and try again.');
   }
 
@@ -244,7 +246,7 @@ public function testProtectNodeFormTooFast() {
 
     // Set up the form and submit it.
     $edit["title[0][value]"] = 'Test Page';
-    $this->drupalPostForm('node/add/article', $edit, t('Save'));
+    $this->drupalPostForm('node/add/article', $edit, $this->t('Save'));
     $this->assertSession()->pageTextContains('There was a problem with your form submission.');
   }
 
@@ -257,7 +259,7 @@ public function testProtectNodeFormPreviewPassthru() {
 
     // Post a node form using the 'Preview' button and make sure it's allowed.
     $edit["title[0][value]"] = 'Test Page';
-    $this->drupalPostForm('node/add/article', $edit, t('Preview'));
+    $this->drupalPostForm('node/add/article', $edit, $this->t('Preview'));
     $this->assertSession()->pageTextNotContains('There was a problem with your form submission.');
   }
 
@@ -288,7 +290,7 @@ public function testProtectContactForm() {
     // Submit the admin form so we can verify the right forms are displayed.
     $this->drupalPostForm('admin/config/content/honeypot', [
       'form_settings[contact_message_feedback_form]' => TRUE,
-    ], t('Save configuration'));
+    ], $this->t('Save configuration'));
 
     $this->drupalLogin($this->webUser);
     $this->drupalGet('contact/feedback');
-- 
GitLab