diff --git a/tests/src/Functional/HooksTest.php b/tests/src/Functional/HooksTest.php
index fed83a9..16a0653 100644
--- a/tests/src/Functional/HooksTest.php
+++ b/tests/src/Functional/HooksTest.php
@@ -94,13 +94,13 @@ class HooksTest extends SearchApiBrowserTestBase {
     $this->assertEquals('Song for My Father', $definition['label']);
 
     // Saving the index should trigger the processor's preIndexSave() method.
-    $this->submitForm([], $this->t('Save'));
+    $this->submitForm([], 'Save');
     $processor_methods = $this->getCalledMethods('processor');
     $this->assertEquals(['preIndexSave'], $processor_methods);
 
     $this->drupalGet($this->getIndexPath());
-    // Duplication on value $this->t('Index now')) with summary.
-    $this->submitForm([], $this->t('Index now'));
+    // Duplication on value 'Index now' with summary.
+    $this->submitForm([], 'Index now');
     $this->checkForMetaRefresh();
     $this->assertSession()->pageTextContains('Successfully indexed 4 items.');
 
@@ -120,7 +120,7 @@ class HooksTest extends SearchApiBrowserTestBase {
 
     // hook_search_api_index_reindex() was invoked.
     $this->drupalGet($this->getIndexPath('reindex'));
-    $this->submitForm([], $this->t('Confirm'));
+    $this->submitForm([], 'Confirm');
     $this->assertSession()->pageTextContains('Montara');
 
     // hook_search_api_data_type_info_alter() was invoked.
diff --git a/tests/src/Functional/LanguageIntegrationTest.php b/tests/src/Functional/LanguageIntegrationTest.php
index ab1a0d4..c2626b8 100644
--- a/tests/src/Functional/LanguageIntegrationTest.php
+++ b/tests/src/Functional/LanguageIntegrationTest.php
@@ -67,14 +67,14 @@ class LanguageIntegrationTest extends SearchApiBrowserTestBase {
 
     // Clear index.
     $this->drupalGet($this->getIndexPath());
-    $this->submitForm([], $this->t('Clear all indexed data'));
-    $this->submitForm([], $this->t('Confirm'));
+    $this->submitForm([], 'Clear all indexed data');
+    $this->submitForm([], 'Confirm');
 
     // Make sure all 5 items are successfully indexed.
     $this->drupalGet($this->getIndexPath());
-    $this->submitForm([], $this->t('Index now'));
+    $this->submitForm([], 'Index now');
     $this->checkForMetaRefresh();
-    $this->assertSession()->pageTextContains($this->t('Successfully indexed 5 items'));
+    $this->assertSession()->pageTextContains('Successfully indexed 5 items');
 
     // Change the datasource to disallow indexing of dutch.
     $form_values = [
@@ -82,7 +82,7 @@ class LanguageIntegrationTest extends SearchApiBrowserTestBase {
       'datasource_configs[entity:node][languages][selected][nl]' => 1,
     ];
     $this->drupalGet($this->getIndexPath('edit'));
-    $this->submitForm($form_values, $this->t('Save'));
+    $this->submitForm($form_values, 'Save');
     $this->checkForMetaRefresh();
     $this->assertSession()->statusCodeEquals(200);
     $this->assertSession()->pageTextContains('The index was successfully saved.');
@@ -90,9 +90,9 @@ class LanguageIntegrationTest extends SearchApiBrowserTestBase {
     // Make sure that we only have 3 indexed items now. The 2 original nodes
     // + 1 translation in lolspeak, the 2 dutch translations should be ignored.
     $this->drupalGet($this->getIndexPath());
-    $this->submitForm([], $this->t('Index now'));
+    $this->submitForm([], 'Index now');
     $this->checkForMetaRefresh();
-    $this->assertSession()->pageTextContains($this->t('Successfully indexed 3 items'));
+    $this->assertSession()->pageTextContains('Successfully indexed 3 items');
 
     // Change the datasource to only allow indexing of dutch.
     $form_values = [
@@ -102,7 +102,7 @@ class LanguageIntegrationTest extends SearchApiBrowserTestBase {
       'datasource_configs[entity:node][bundles][selected][article]' => 1,
     ];
     $this->drupalGet($this->getIndexPath('edit'));
-    $this->submitForm($form_values, $this->t('Save'));
+    $this->submitForm($form_values, 'Save');
     $this->checkForMetaRefresh();
     $this->assertSession()->statusCodeEquals(200);
     //Completed 1 of 1.
@@ -111,9 +111,9 @@ class LanguageIntegrationTest extends SearchApiBrowserTestBase {
     // Make sure that we only have 2 index items. The only indexed items should
     // be the dutch translations.
     $this->drupalGet($this->getIndexPath());
-    $this->submitForm([], $this->t('Index now'));
+    $this->submitForm([], 'Index now');
     $this->checkForMetaRefresh();
-    $this->assertSession()->pageTextContains($this->t('Successfully indexed 2 items'));
+    $this->assertSession()->pageTextContains('Successfully indexed 2 items');
   }
 
   /**
diff --git a/tests/src/Functional/OverviewPageTest.php b/tests/src/Functional/OverviewPageTest.php
index a903ab5..5790a1e 100644
--- a/tests/src/Functional/OverviewPageTest.php
+++ b/tests/src/Functional/OverviewPageTest.php
@@ -101,7 +101,7 @@ class OverviewPageTest extends SearchApiBrowserTestBase {
     $index_class = Html::cleanCssIdentifier($index->getEntityTypeId() . '-' . $index->id());
     $fields = $this->xpath('//tr[contains(@class,"' . $index_class . '") and contains(@class, "search-api-list-enabled")]');
     $this->assertNotEmpty($fields, 'Index is in proper table');
-    $this->assertSession()->linkNotExists($this->t('Execute pending tasks'), 'No pending tasks to execute.');
+    $this->assertSession()->linkNotExists('Execute pending tasks', 'No pending tasks to execute.');
 
     // Tests that the "Execute pending tasks" local action is correctly
     // displayed when there are pending tasks.
@@ -113,7 +113,7 @@ class OverviewPageTest extends SearchApiBrowserTestBase {
     // #2722237.
     \Drupal::cache('render')->invalidateAll();
     $this->drupalGet($this->overviewPageUrl);
-    $this->assertSession()->linkExists($this->t('Execute pending tasks'), 0);
+    $this->assertSession()->linkExists('Execute pending tasks', 0);
   }
 
   /**
diff --git a/tests/src/Functional/ProcessorIntegrationTest.php b/tests/src/Functional/ProcessorIntegrationTest.php
index 1c9a77b..67209d0 100644
--- a/tests/src/Functional/ProcessorIntegrationTest.php
+++ b/tests/src/Functional/ProcessorIntegrationTest.php
@@ -197,7 +197,7 @@ class ProcessorIntegrationTest extends SearchApiBrowserTestBase {
     $edit = [
       'status[stopwords]' => FALSE,
     ];
-    $this->submitForm($edit, $this->t('Save'));
+    $this->submitForm($edit, 'Save');
     $enabled = array_values(array_diff($enabled, ['stopwords']));
     $actual_processors = array_keys($this->loadIndex()->getProcessors());
     sort($actual_processors);
@@ -212,10 +212,10 @@ class ProcessorIntegrationTest extends SearchApiBrowserTestBase {
   public function testLimitProcessors() {
     $this->loadProcessorsTab();
     $this->assertSession()->statusCodeEquals(200);
-    $this->assertSession()->pageTextContains($this->t('Highlight'));
-    $this->assertSession()->pageTextContains($this->t('Ignore character'));
-    $this->assertSession()->pageTextContains($this->t('Tokenizer'));
-    $this->assertSession()->pageTextContains($this->t('Stopwords'));
+    $this->assertSession()->pageTextContains('Highlight');
+    $this->assertSession()->pageTextContains('Ignore character');
+    $this->assertSession()->pageTextContains('Tokenizer');
+    $this->assertSession()->pageTextContains('Stopwords');
 
     // Create a new server with the "search_api_test" backend.
     $server = Server::create([
@@ -237,15 +237,15 @@ class ProcessorIntegrationTest extends SearchApiBrowserTestBase {
     // Use the newly created server.
     $settings_path = 'admin/config/search/search-api/index/' . $this->indexId . '/edit';
     $this->drupalGet($settings_path);
-    $this->submitForm(['server' => 'webtest_server'], $this->t('Save'));
+    $this->submitForm(['server' => 'webtest_server'], 'Save');
 
     // Load the processors again and check that they are not shown anymore.
     $this->loadProcessorsTab();
     $this->assertSession()->statusCodeEquals(200);
-    $this->assertSession()->pageTextNotContains($this->t('Highlight'));
-    $this->assertSession()->pageTextNotContains($this->t('Ignore character'));
-    $this->assertSession()->pageTextNotContains($this->t('Tokenizer'));
-    $this->assertSession()->pageTextNotContains($this->t('Stopwords'));
+    $this->assertSession()->pageTextNotContains('Highlight');
+    $this->assertSession()->pageTextNotContains('Ignore character');
+    $this->assertSession()->pageTextNotContains('Tokenizer');
+    $this->assertSession()->pageTextNotContains('Stopwords');
   }
 
   /**
@@ -264,8 +264,8 @@ class ProcessorIntegrationTest extends SearchApiBrowserTestBase {
     // See \Drupal\search_api\Tests\IntegrationTest::addField().
     $this->assertSession()->responseContains('name="aggregated_field"');
     $this->submitForm([], 'aggregated_field');
-    $args['%label'] = $this->t('Aggregated field');
-    $this->assertSession()->responseContains($this->t('Field %label was added to the index.', $args));
+    $args['%label'] = 'Aggregated field';
+    $this->assertSession()->responseContains(new FormattableMarkup('Field %label was added to the index.', $args));
     $this->assertSession()->addressEquals($this->getIndexPath('fields/aggregated_field/edit'));
     $edit = [
       'type' => 'first',
@@ -273,10 +273,10 @@ class ProcessorIntegrationTest extends SearchApiBrowserTestBase {
       'fields[entity:node/type]' => 'type',
       'fields[entity:node/uid]' => 'uid',
     ];
-    $this->submitForm($edit, $this->t('Save'));
+    $this->submitForm($edit, 'Save');
 
     $this->assertSession()->addressEquals($this->getIndexPath('fields'));
-    $this->assertSession()->responseContains($this->t('The field configuration was successfully saved.'));
+    $this->assertSession()->responseContains('The field configuration was successfully saved.');
   }
 
   /**
@@ -345,7 +345,7 @@ h1: 4
 foo bar
 TAGS
     ];
-    $this->checkValidationError($configuration, 'html_filter', $this->t('Tags is not a valid YAML map.'));
+    $this->checkValidationError($configuration, 'html_filter', 'Tags is not a valid YAML map.');
     $configuration = [
       'tags' => <<<TAGS
 h1:
@@ -356,9 +356,9 @@ h3: -1
 TAGS
     ];
     $errors = [
-      $this->t("Boost value for tag @tag can't be an array.", ['@tag' => '<h1>']),
-      $this->t('Boost value for tag @tag must be numeric.', ['@tag' => '<h2>']),
-      $this->t('Boost value for tag @tag must be non-negative.', ['@tag' => '<h3>']),
+      new FormattableMarkup("Boost value for tag @tag can't be an array.", ['@tag' => '<h1>']),
+      new FormattableMarkup('Boost value for tag @tag must be numeric.', ['@tag' => '<h2>']),
+      new FormattableMarkup('Boost value for tag @tag must be non-negative.', ['@tag' => '<h3>']),
     ];
     $this->checkValidationError($configuration, 'html_filter', $errors);
 
@@ -387,7 +387,7 @@ TAGS
     $configuration = [
       'ignorable' => ':)',
     ];
-    $this->checkValidationError($configuration, 'ignore_character', $this->t('The entered text is no valid regular expression.'));
+    $this->checkValidationError($configuration, 'ignore_character', 'The entered text is no valid regular expression.');
 
     $configuration = $form_values = [
       'ignorable' => '[¿¡!?,.]',
@@ -442,18 +442,18 @@ TAGS
     // See \Drupal\search_api\Tests\IntegrationTest::addField().
     $this->assertSession()->responseContains('name="rendered_item"');
     $this->submitForm([], 'rendered_item');
-    $args['%label'] = $this->t('Rendered HTML output');
-    $this->assertSession()->responseContains($this->t('Field %label was added to the index.', $args));
+    $args['%label'] = 'Rendered HTML output';
+    $this->assertSession()->responseContains(new FormattableMarkup('Field %label was added to the index.', $args));
     $this->assertSession()->addressEquals($this->getIndexPath('fields/rendered_item/edit'));
     $edit = [
       'roles[]' => ['authenticated'],
       'view_mode[entity:node][article]' => 'default',
       'view_mode[entity:node][page]' => 'teaser',
     ];
-    $this->submitForm($edit, $this->t('Save'));
+    $this->submitForm($edit, 'Save');
 
     $this->assertSession()->addressEquals($this->getIndexPath('fields'));
-    $this->assertSession()->responseContains($this->t('The field configuration was successfully saved.'));
+    $this->assertSession()->responseContains('The field configuration was successfully saved.');
   }
 
   /**
@@ -476,7 +476,7 @@ TAGS
     $configuration = [
       'spaces' => ':)',
     ];
-    $this->checkValidationError($configuration, 'tokenizer', $this->t('The entered text is no valid regular expression.'));
+    $this->checkValidationError($configuration, 'tokenizer', 'The entered text is no valid regular expression.');
 
     $configuration = [
       'spaces' => '',
@@ -535,7 +535,7 @@ TAGS
     $edit = [
       "status[$processor_id]" => 1,
     ];
-    $this->submitForm($edit, $this->t('Save'));
+    $this->submitForm($edit, 'Save');
     $this->assertTrue($this->loadIndex()->isValidProcessor($processor_id), "Successfully enabled the '$processor_id' processor.'");
   }
 
@@ -569,7 +569,7 @@ TAGS
     if ($enable) {
       $edit["status[$processor_id]"] = 1;
     }
-    $this->submitForm($edit, $this->t('Save'));
+    $this->submitForm($edit, 'Save');
 
     $processor = $this->loadIndex()->getProcessor($processor_id);
     $this->assertTrue($processor, "Successfully enabled the '$processor_id' processor.'");
@@ -599,7 +599,7 @@ TAGS
 
     $edit = $this->getFormValues($form_values, "processors[$processor_id][settings]");
     $edit["status[$processor_id]"] = 1;
-    $this->submitForm($edit, $this->t('Save'));
+    $this->submitForm($edit, 'Save');
 
     if (!is_array($messages)) {
       $messages = [$messages];
@@ -607,8 +607,8 @@ TAGS
     foreach ($messages as $message) {
       $this->assertSession()->responseContains($message);
     }
-    $this->assertSession()->pageTextNotContains($this->t('The indexing workflow was successfully edited.'));
-    $this->assertSession()->pageTextNotContains($this->t('No values were changed.'));
+    $this->assertSession()->pageTextNotContains('The indexing workflow was successfully edited.');
+    $this->assertSession()->pageTextNotContains('No values were changed.');
 
     $this->loadProcessorsTab(TRUE);
   }
diff --git a/tests/src/Functional/SearchApiBrowserTestBase.php b/tests/src/Functional/SearchApiBrowserTestBase.php
index ec4da8b..8cc34e8 100644
--- a/tests/src/Functional/SearchApiBrowserTestBase.php
+++ b/tests/src/Functional/SearchApiBrowserTestBase.php
@@ -3,7 +3,6 @@
 namespace Drupal\Tests\search_api\Functional;
 
 use Drupal\Component\Utility\Html;
-use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\node\Entity\NodeType;
 use Drupal\search_api\Entity\Index;
 use Drupal\search_api\Entity\Server;
@@ -14,8 +13,6 @@ use Drupal\Tests\BrowserTestBase;
  */
 abstract class SearchApiBrowserTestBase extends BrowserTestBase {
 
-  use StringTranslationTrait;
-
   /**
    * Modules to enable for this test.
    *
diff --git a/tests/src/Functional/ViewsTest.php b/tests/src/Functional/ViewsTest.php
index c09b003..9c7e5f9 100644
--- a/tests/src/Functional/ViewsTest.php
+++ b/tests/src/Functional/ViewsTest.php
@@ -10,14 +10,12 @@ use Drupal\Core\DrupalKernel;
 use Drupal\Core\Language\Language;
 use Drupal\Core\Session\UserSession;
 use Drupal\Core\Site\Settings;
-use Drupal\Core\StringTranslation\StringTranslationTrait;
 use Drupal\Core\Url;
 use Drupal\entity_test\Entity\EntityTestMulRevChanged;
 use Drupal\language\Entity\ConfigurableLanguage;
 use Drupal\search_api\Entity\Index;
 use Drupal\search_api\SearchApiException;
 use Drupal\search_api\Utility\Utility;
-use Drupal\user\Entity\User;
 
 /**
  * Tests the Views integration of the Search API.
@@ -27,7 +25,6 @@ use Drupal\user\Entity\User;
 class ViewsTest extends SearchApiBrowserTestBase {
 
   use ExampleContentTrait;
-  use StringTranslationTrait;
 
   /**
    * Modules to enable for this test.
@@ -318,8 +315,8 @@ class ViewsTest extends SearchApiBrowserTestBase {
 
     // Delete the page display for the view.
     $this->drupalGet('admin/structure/views/view/search_api_test_view');
-    $this->submitForm([], $this->t('Delete Page'));
-    $this->submitForm([], $this->t('Save'));
+    $this->submitForm([], 'Delete Page');
+    $this->submitForm([], 'Save');
 
     drupal_flush_all_caches();
 
@@ -424,40 +421,40 @@ class ViewsTest extends SearchApiBrowserTestBase {
     $this->entities[5]->setOwnerId($users[2]->id())->save();
 
     // Switch to "Table" format.
-    $this->clickLink($this->t('Unformatted list'));
+    $this->clickLink('Unformatted list');
     $this->assertSession()->statusCodeEquals(200);
     $edit = [
       'style[type]' => 'table',
     ];
-    $this->submitForm($edit, $this->t('Apply'));
+    $this->submitForm($edit, 'Apply');
     $this->assertSession()->statusCodeEquals(200);
-    $this->submitForm([], $this->t('Apply'));
+    $this->submitForm([], 'Apply');
     $this->assertSession()->statusCodeEquals(200);
 
     // Add the "User ID" relationship.
-    $this->clickLink($this->t('Add relationships'));
+    $this->clickLink('Add relationships');
     $edit = [
       'name[search_api_datasource_database_search_index_entity_entity_test_mulrev_changed.user_id]' => 'search_api_datasource_database_search_index_entity_entity_test_mulrev_changed.user_id',
     ];
-    $this->submitForm($edit, $this->t('Add and configure relationships'));
-    $this->submitForm([], $this->t('Apply'));
+    $this->submitForm($edit, 'Add and configure relationships');
+    $this->submitForm([], 'Apply');
 
     // Add new fields. First check that the listing seems correct.
-    $this->clickLink($this->t('Add fields'));
+    $this->clickLink('Add fields');
     $this->assertSession()->statusCodeEquals(200);
-    $this->assertSession()->pageTextContains($this->t('Test entity - revisions and data table datasource'));
-    $this->assertSession()->pageTextContains($this->t('Authored on'));
-    $this->assertSession()->pageTextContains($this->t('Body (indexed field)'));
-    $this->assertSession()->pageTextContains($this->t('Index Test index'));
-    $this->assertSession()->pageTextContains($this->t('Item ID'));
-    $this->assertSession()->pageTextContains($this->t('Excerpt'));
-    $this->assertSession()->pageTextContains($this->t('The search result excerpted to show found search terms'));
-    $this->assertSession()->pageTextContains($this->t('Relevance'));
-    $this->assertSession()->pageTextContains($this->t('The relevance of this search result with respect to the query'));
-    $this->assertSession()->pageTextContains($this->t('Language code'));
-    $this->assertSession()->pageTextContains($this->t('The user language code.'));
-    $this->assertSession()->pageTextContains($this->t('(No description available)'));
-    $this->assertSession()->pageTextNotContains($this->t('Error: missing help'));
+    $this->assertSession()->pageTextContains('Test entity - revisions and data table datasource');
+    $this->assertSession()->pageTextContains('Authored on');
+    $this->assertSession()->pageTextContains('Body (indexed field)');
+    $this->assertSession()->pageTextContains('Index Test index');
+    $this->assertSession()->pageTextContains('Item ID');
+    $this->assertSession()->pageTextContains('Excerpt');
+    $this->assertSession()->pageTextContains('The search result excerpted to show found search terms');
+    $this->assertSession()->pageTextContains('Relevance');
+    $this->assertSession()->pageTextContains('The relevance of this search result with respect to the query');
+    $this->assertSession()->pageTextContains('Language code');
+    $this->assertSession()->pageTextContains('The user language code.');
+    $this->assertSession()->pageTextContains('(No description available)');
+    $this->assertSession()->pageTextNotContains('Error: missing help');
 
     // Then add some fields.
     $fields = [
@@ -476,7 +473,7 @@ class ViewsTest extends SearchApiBrowserTestBase {
     foreach ($fields as $field) {
       $edit["name[$field]"] = $field;
     }
-    $this->submitForm($edit, $this->t('Add and configure fields'));
+    $this->submitForm($edit, 'Add and configure fields');
     $this->assertSession()->statusCodeEquals(200);
 
     // @todo For some strange reason, the "roles" field form is not included
@@ -501,28 +498,28 @@ class ViewsTest extends SearchApiBrowserTestBase {
     }
 
     // Add click sorting for all fields where this is possible.
-    $this->clickLink($this->t('Settings'), 0);
+    $this->clickLink('Settings', 0);
     $edit = [
       'style_options[info][search_api_datasource][sortable]' => 1,
       'style_options[info][category][sortable]' => 1,
       'style_options[info][keywords][sortable]' => 1,
     ];
-    $this->submitForm($edit, $this->t('Apply'));
+    $this->submitForm($edit, 'Apply');
 
     // Add a filter for the "Name" field.
-    $this->clickLink($this->t('Add filter criteria'));
+    $this->clickLink('Add filter criteria');
     $edit = [
       'name[search_api_index_database_search_index.name]' => 'search_api_index_database_search_index.name',
     ];
-    $this->submitForm($edit, $this->t('Add and configure filter criteria'));
+    $this->submitForm($edit, 'Add and configure filter criteria');
     $edit = [
       'options[expose_button][checkbox][checkbox]' => 1,
     ];
-    $this->submitForm($edit, $this->t('Expose filter'));
+    $this->submitForm($edit, 'Expose filter');
     $this->submitPluginForm([]);
 
     // Save the view.
-    $this->submitForm([], $this->t('Save'));
+    $this->submitForm([], 'Save');
     $this->assertSession()->statusCodeEquals(200);
 
     // Check the results.
@@ -624,8 +621,8 @@ class ViewsTest extends SearchApiBrowserTestBase {
     // The "name" field should now be listed regardless.
     $this->drupalLogin($admin_user);
     $this->drupalGet('admin/structure/views/nojs/handler/search_api_test_view/page_1/relationship/user_id');
-    $this->submitForm(['options[skip_access]' => 1], $this->t('Apply'));
-    $this->submitForm([], $this->t('Save'));
+    $this->submitForm(['options[skip_access]' => 1], 'Apply');
+    $this->submitForm([], 'Save');
     $this->assertSession()->statusCodeEquals(200);
 
     $this->drupalLogout();
@@ -704,7 +701,7 @@ class ViewsTest extends SearchApiBrowserTestBase {
    *   The values to set in the form.
    */
   protected function submitPluginForm(array $edit) {
-    $button_label = $this->t('Apply');
+    $button_label = 'Apply';
     $buttons = $this->xpath('//input[starts-with(@value, :label)]', [':label' => $button_label->render()]);
     if ($buttons) {
       $button_label = $buttons[0]->getAttribute('value');
diff --git a/tests/src/Kernel/LanguageKernelTest.php b/tests/src/Kernel/LanguageKernelTest.php
index d1e4bf5..50bc8af 100644
--- a/tests/src/Kernel/LanguageKernelTest.php
+++ b/tests/src/Kernel/LanguageKernelTest.php
@@ -4,7 +4,6 @@ namespace Drupal\Tests\search_api\Kernel;
 
 use Drupal\Component\Render\FormattableMarkup;
 use Drupal\entity_test\Entity\EntityTestMulRevChanged;
-use Drupal\entity_test\Entity\EntityTestMul;
 use Drupal\field\Entity\FieldConfig;
 use Drupal\field\Entity\FieldStorageConfig;
 use Drupal\KernelTests\KernelTestBase;
