diff --git a/payment/uc_credit/src/Tests/CreditCardTest.php b/payment/uc_credit/src/Tests/CreditCardTest.php
index b254e9f..967520e 100644
--- a/payment/uc_credit/src/Tests/CreditCardTest.php
+++ b/payment/uc_credit/src/Tests/CreditCardTest.php
@@ -79,7 +79,7 @@ class CreditCardTest extends UbercartTestBase {
     $this->assertFieldByName(
       'methods[credit][status]',
       TRUE,
-      t('Credit card payment method is enabled')
+      'Credit card payment method is enabled'
     );
 
     // Create key directory, make it readable and writeable.
@@ -99,12 +99,12 @@ class CreditCardTest extends UbercartTestBase {
     $this->assertFieldByName(
       'uc_credit_encryption_path',
       'sites/default/files/simpletest.keys',
-      t('Key file path has been set.')
+      'Key file path has been set.'
     );
 
     $this->assertTrue(
       file_exists('sites/default/files/simpletest.keys/' . UC_CREDIT_KEYFILE_NAME),
-      t('Key has been generated and stored.')
+      'Key has been generated and stored.'
     );
     $this->pass('Key = ' . uc_credit_encryption_key());
 
@@ -126,7 +126,7 @@ class CreditCardTest extends UbercartTestBase {
     $this->assertFieldByName(
       'uc_pg_test_gateway_enabled',
       TRUE,
-      t('Test gateway is enabled')
+      'Test gateway is enabled'
     );
   }
 
@@ -167,7 +167,7 @@ class CreditCardTest extends UbercartTestBase {
     $this->assertFieldByName(
       'uc_credit_encryption_path',
       t('Not configured.'),
-      t('Key file has not yet been configured.')
+      'Key file has not yet been configured.'
     );
     // Restore variable setting.
     $config->set('encryption_path', $temp_variable)->save();
@@ -209,7 +209,7 @@ class CreditCardTest extends UbercartTestBase {
     $this->assertFieldByName(
       'uc_credit_encryption_path',
       'sites/default/files/testkey',
-      t('Key file path has been set.')
+      'Key file path has been set.'
     );
     $this->assertText('Credit card encryption key file generated.');
 
@@ -229,11 +229,11 @@ class CreditCardTest extends UbercartTestBase {
     // Test contents - must contain 32-character hexadecimal string.
     $this->assertTrue(
       file_exists('sites/default/files/simpletest.keys/' . UC_CREDIT_KEYFILE_NAME),
-      t('Key has been generated and stored.')
+      'Key has been generated and stored.'
     );
     $this->assertTrue(
       preg_match("([0-9a-fA-F]{32})", uc_credit_encryption_key()),
-      t('Valid key detected in key file.')
+      'Valid key detected in key file.'
     );
 
     // Cleanup keys directory after test.
diff --git a/shipping/uc_quote/src/Tests/QuoteTest.php b/shipping/uc_quote/src/Tests/QuoteTest.php
index 1f80008..21d3cdd 100644
--- a/shipping/uc_quote/src/Tests/QuoteTest.php
+++ b/shipping/uc_quote/src/Tests/QuoteTest.php
@@ -214,8 +214,8 @@ class QuoteTest extends UbercartTestBase {
         }
       }
       // Verify line item is correct.
-      $this->assertEqual($line['type'], 'shipping', t('The shipping line item was saved to the order.'));
-      $this->assertEqual($quote1->amount, uc_currency_format($line['amount']), t('Stored shipping line item has the correct amount.'));
+      $this->assertEqual($line['type'], 'shipping', 'The shipping line item was saved to the order.');
+      $this->assertEqual($quote1->amount, uc_currency_format($line['amount']), 'Stored shipping line item has the correct amount.');
 
       // Verify order total is correct on order-view form.
       $this->drupalGet('admin/store/orders/' . $order_id);
@@ -223,8 +223,8 @@ class QuoteTest extends UbercartTestBase {
 
       // Verify shipping line item is correct on order edit form.
       $this->drupalGet('admin/store/orders/' . $order_id . '/edit');
-      $this->assertFieldByName('line_items[' . $line['line_item_id'] . '][title]', $quote1->label, t('Found the correct shipping line item title.'));
-      $this->assertFieldByName('line_items[' . $line['line_item_id'] . '][amount]', substr($quote1->amount, 1), t('Found the correct shipping line item title.'));
+      $this->assertFieldByName('line_items[' . $line['line_item_id'] . '][title]', $quote1->label, 'Found the correct shipping line item title.');
+      $this->assertFieldByName('line_items[' . $line['line_item_id'] . '][amount]', substr($quote1->amount, 1), 'Found the correct shipping line item title.');
 
       // Verify that the "get quotes" button works as expected.
       $result = $this->ucPostAjax('admin/store/orders/' . $order_id . '/edit', [], ['op' => t('Get shipping quotes')]);
diff --git a/uc_attribute/src/Tests/AttributeTest.php b/uc_attribute/src/Tests/AttributeTest.php
index d5a2ed4..ee0b151 100644
--- a/uc_attribute/src/Tests/AttributeTest.php
+++ b/uc_attribute/src/Tests/AttributeTest.php
@@ -38,7 +38,7 @@ class AttributeTest extends UbercartTestBase {
     // Check the attribute integrity.
     foreach ($this->attributeFieldsToTest() as $field) {
       if ($loaded_attribute->$field != $attribute->$field) {
-        $this->fail(t('Attribute integrity check failed.'));
+        $this->fail('Attribute integrity check failed.');
         break;
       }
     }
@@ -59,7 +59,7 @@ class AttributeTest extends UbercartTestBase {
     // Check the attribute integrity.
     foreach ($this->attributeFieldsToTest('product') as $field) {
       if ($loaded_attribute->$field != $attribute->$field) {
-        $this->fail(t('Attribute integrity check failed.'));
+        $this->fail('Attribute integrity check failed.');
         break;
       }
     }
diff --git a/uc_cart/src/Tests/CartCheckoutTest.php b/uc_cart/src/Tests/CartCheckoutTest.php
index dce26f5..9c3594b 100644
--- a/uc_cart/src/Tests/CartCheckoutTest.php
+++ b/uc_cart/src/Tests/CartCheckoutTest.php
@@ -113,8 +113,8 @@ class CartCheckoutTest extends UbercartTestBase {
 
     // Test the cart page.
     $this->drupalGet('cart');
-    $this->assertText($this->product->label(), t('The product is in the cart.'));
-    $this->assertFieldByName('items[0][qty]', 1, t('The product quantity is 1.'));
+    $this->assertText($this->product->label(), 'The product is in the cart.');
+    $this->assertFieldByName('items[0][qty]', 1, 'The product quantity is 1.');
 
     // Add the item again.
     $this->addToCart($this->product);
@@ -123,13 +123,13 @@ class CartCheckoutTest extends UbercartTestBase {
 
     // Test the cart page again.
     $this->drupalGet('cart');
-    $this->assertFieldByName('items[0][qty]', 2, t('The product quantity is 2.'));
+    $this->assertFieldByName('items[0][qty]', 2, 'The product quantity is 2.');
 
     // Update the quantity.
     $qty = mt_rand(3, 100);
     $this->drupalPostForm('cart', array('items[0][qty]' => $qty), t('Update cart'));
     $this->assertText('Your cart has been updated.');
-    $this->assertFieldByName('items[0][qty]', $qty, t('The product quantity was updated.'));
+    $this->assertFieldByName('items[0][qty]', $qty, 'The product quantity was updated.');
     $this->assertText('hook_uc_cart_item_update fired');
 
     // Update the quantity to zero.
@@ -170,8 +170,8 @@ class CartCheckoutTest extends UbercartTestBase {
     // Log in and check the items are merged.
     $this->drupalLogin($this->customer);
     $this->drupalGet('cart');
-    $this->assertText($this->product->label(), t('The product remains in the cart after logging in.'));
-    $this->assertFieldByName('items[0][qty]', 2, t('The product quantity is 2.'));
+    $this->assertText($this->product->label(), 'The product remains in the cart after logging in.');
+    $this->assertFieldByName('items[0][qty]', 2, 'The product quantity is 2.');
   }
 
   public function testDeletedCartItem() {
@@ -442,7 +442,7 @@ class CartCheckoutTest extends UbercartTestBase {
     $this->drupalPostForm('cart', [], 'Checkout');
     $this->assertText(
       t('Enter your billing address and information here.'),
-      t('Viewed cart page: Billing pane has been displayed.')
+      'Viewed cart page: Billing pane has been displayed.'
     );
 
     // Submit the checkout page.
diff --git a/uc_cart/src/Tests/CartSettingsTest.php b/uc_cart/src/Tests/CartSettingsTest.php
index e0b43e1..a904e34 100644
--- a/uc_cart/src/Tests/CartSettingsTest.php
+++ b/uc_cart/src/Tests/CartSettingsTest.php
@@ -42,7 +42,7 @@ class CartSettingsTest extends UbercartTestBase {
     $this->drupalGet('admin/store/config/cart');
     $this->assertField(
       'uc_add_item_redirect',
-      t('Add to cart redirect field exists')
+      'Add to cart redirect field exists'
     );
 
     $redirect = 'admin/store';
@@ -60,7 +60,7 @@ class CartSettingsTest extends UbercartTestBase {
     $url_pass = ($this->getUrl() == Url::fromUri('base:' . $redirect, ['absolute' => TRUE])->toString());
     $this->assertTrue(
       $url_pass,
-      t('Add to cart redirect takes user to the correct URL.')
+      'Add to cart redirect takes user to the correct URL.'
     );
   }
 
@@ -82,7 +82,7 @@ class CartSettingsTest extends UbercartTestBase {
     $this->drupalGet('admin/store/config/cart');
     $this->assertField(
       'uc_minimum_subtotal',
-      t('Minimum order subtotal field exists')
+      'Minimum order subtotal field exists'
     );
 
     $minimum_subtotal = mt_rand(2, 9999);
@@ -109,7 +109,7 @@ class CartSettingsTest extends UbercartTestBase {
     );
     $this->assertRaw(
       'The minimum order subtotal for checkout is',
-      t('Prevented checkout below the minimum order total.')
+      'Prevented checkout below the minimum order total.'
     );
 
     // Add another product to the cart, and verify that we land on the checkout page.
@@ -136,23 +136,23 @@ class CartSettingsTest extends UbercartTestBase {
     $this->assertLink(
       t('Continue shopping'),
       0,
-      t('Continue shopping link appears on the page.')
+      'Continue shopping link appears on the page.'
     );
     $links = $this->xpath('//a[@href="' . \Drupal::url('entity.node.canonical', ['node' => $this->product->id()]) . '"]');
     $this->assertTrue(
       isset($links[0]),
-      t('Continue shopping link returns to the product page.')
+      'Continue shopping link returns to the product page.'
     );
 
     $this->drupalLogin($this->adminUser);
     $this->drupalGet('admin/store/config/cart');
     $this->assertField(
       'uc_continue_shopping_type',
-      t('Continue shopping element display field exists')
+      'Continue shopping element display field exists'
     );
     $this->assertField(
       'uc_continue_shopping_url',
-      t('Default continue shopping link URL field exists')
+      'Default continue shopping link URL field exists'
     );
 
     // Test continue shopping button that sends users to a fixed URL.
@@ -175,7 +175,7 @@ class CartSettingsTest extends UbercartTestBase {
     $url_pass = ($this->getUrl() == Url::fromUri('base:' . $settings['uc_continue_shopping_url'], ['absolute' => TRUE])->toString());
     $this->assertTrue(
       $url_pass,
-      t('Continue shopping button takes the user to the correct URL.')
+      'Continue shopping button takes the user to the correct URL.'
     );
   }
 
@@ -184,11 +184,11 @@ class CartSettingsTest extends UbercartTestBase {
     $this->drupalGet('admin/store/config/cart');
     $this->assertField(
       'uc_cart_breadcrumb_text',
-      t('Custom cart breadcrumb text field exists')
+      'Custom cart breadcrumb text field exists'
     );
     $this->assertField(
       'uc_cart_breadcrumb_url',
-      t('Custom cart breadcrumb URL')
+      'Custom cart breadcrumb URL'
     );
 
     $settings = array(
@@ -209,12 +209,12 @@ class CartSettingsTest extends UbercartTestBase {
     $this->assertLink(
       $settings['uc_cart_breadcrumb_text'],
       0,
-      t('The breadcrumb link text is set correctly.')
+      'The breadcrumb link text is set correctly.'
     );
     $links = $this->xpath('//a[@href="' . Url::fromUri('internal:/' . $settings['uc_cart_breadcrumb_url'], ['absolute' => TRUE])->toString() . '"]');
     $this->assertTrue(
       isset($links[0]),
-      t('The breadcrumb link is set correctly.')
+      'The breadcrumb link is set correctly.'
     );
   }
 }
diff --git a/uc_cart/src/Tests/CheckoutSettingsTest.php b/uc_cart/src/Tests/CheckoutSettingsTest.php
index a37ead3..bc84db7 100644
--- a/uc_cart/src/Tests/CheckoutSettingsTest.php
+++ b/uc_cart/src/Tests/CheckoutSettingsTest.php
@@ -21,7 +21,7 @@ class CheckoutSettingsTest extends UbercartTestBase {
     $this->drupalGet('admin/store/config/checkout');
     $this->assertField(
       'uc_checkout_enabled',
-      t('Enable checkout field exists')
+      'Enable checkout field exists'
     );
 
     $this->drupalPostForm(
@@ -39,7 +39,7 @@ class CheckoutSettingsTest extends UbercartTestBase {
     $buttons = $this->xpath('//input[@value="' . t('Checkout') . '"]');
     $this->assertFalse(
       isset($buttons[0]),
-      t('The checkout button is not shown.')
+      'The checkout button is not shown.'
     );
   }
 
@@ -48,7 +48,7 @@ class CheckoutSettingsTest extends UbercartTestBase {
     $this->drupalGet('admin/store/config/checkout');
     $this->assertField(
       'uc_checkout_anonymous',
-      t('Anonymous checkout field exists')
+      'Anonymous checkout field exists'
     );
 
     $this->drupalPostForm(
@@ -70,7 +70,7 @@ class CheckoutSettingsTest extends UbercartTestBase {
     );
     $this->assertNoText(
       'Enter your billing address and information here.',
-      t('The checkout page is not displayed.')
+      'The checkout page is not displayed.'
     );
   }
 }
diff --git a/uc_store/src/Tests/AddressTest.php b/uc_store/src/Tests/AddressTest.php
index ea3954a..a0dbe3b 100644
--- a/uc_store/src/Tests/AddressTest.php
+++ b/uc_store/src/Tests/AddressTest.php
@@ -81,7 +81,7 @@ class AddressTest extends UbercartTestBase {
     $address->phone = 'this is not a valid phone number';
     $this->assertTrue(
       $this->test_address[0]->isSamePhysicalLocation($address),
-      t('Physical address comparison ignores non-physical fields.')
+      'Physical address comparison ignores non-physical fields.'
     );
 
     // Use specific address.
@@ -91,14 +91,14 @@ class AddressTest extends UbercartTestBase {
     $address->city = 'vIcToRia';
     $this->assertTrue(
       $this->test_address[1]->isSamePhysicalLocation($address),
-      t('Case-insensitive address comparison works.')
+      'Case-insensitive address comparison works.'
     );
 
     // Modify city and test equality
     $address->city = '		vic toria ';
     $this->assertTrue(
       $this->test_address[1]->isSamePhysicalLocation($address),
-      t('Whitespace-insensitive address comparison works.')
+      'Whitespace-insensitive address comparison works.'
     );
 
   }
diff --git a/uc_store/src/Tests/UbercartTestBase.php b/uc_store/src/Tests/UbercartTestBase.php
index 3e00904..c0900a3 100644
--- a/uc_store/src/Tests/UbercartTestBase.php
+++ b/uc_store/src/Tests/UbercartTestBase.php
@@ -241,7 +241,7 @@ abstract class UbercartTestBase extends WebTestBase {
     $this->drupalPostForm('cart', [], 'Checkout');
     $this->assertText(
       t('Enter your billing address and information here.'),
-      t('Viewed cart page: Billing pane has been displayed.')
+      'Viewed cart page: Billing pane has been displayed.'
     );
 
     $edit = $this->populateCheckoutForm($edit);
@@ -258,13 +258,11 @@ abstract class UbercartTestBase extends WebTestBase {
       ->execute();
     $order_id = reset($order_ids);
     if ($order_id) {
-      $this->pass(
-        t('Order %order_id has been created', ['%order_id' => $order_id])
-      );
+      $this->pass(SafeMarkup::format('Order %order_id has been created', ['%order_id' => $order_id]));
       $order = \Drupal\uc_order\Entity\Order::load($order_id);
     }
     else {
-      $this->fail(t('No order was created.'));
+      $this->fail('No order was created.');
       $order = FALSE;
     }
 
diff --git a/uc_tax/src/Tests/StoredTaxTest.php b/uc_tax/src/Tests/StoredTaxTest.php
index 2649faa..9a6cb91 100644
--- a/uc_tax/src/Tests/StoredTaxTest.php
+++ b/uc_tax/src/Tests/StoredTaxTest.php
@@ -31,11 +31,11 @@ class StoredTaxTest extends UbercartTestBase {
   }
 
   protected function assertTaxLineCorrect($line, $rate, $when) {
-    $this->assertTrue($line, t('The tax line item was saved to the order ' . $when));
-    $this->assertTrue(number_format($rate * $this->product->price->value, 2) == number_format($line['amount'], 2), t('Stored tax line item has the correct amount ' . $when));
-    $this->assertFieldByName('line_items[' . $line['line_item_id'] . '][li_id]', $line['line_item_id'], t('Found the tax line item ID ' . $when));
-    $this->assertText($line['title'], t('Found the tax title ' . $when));
-    $this->assertText(uc_currency_format($line['amount']), t('Tax display has the correct amount ' . $when));
+    $this->assertTrue($line, 'The tax line item was saved to the order ' . $when);
+    $this->assertTrue(number_format($rate * $this->product->price->value, 2) == number_format($line['amount'], 2), 'Stored tax line item has the correct amount ' . $when);
+    $this->assertFieldByName('line_items[' . $line['line_item_id'] . '][li_id]', $line['line_item_id'], 'Found the tax line item ID ' . $when);
+    $this->assertText($line['title'], 'Found the tax title ' . $when);
+    $this->assertText(uc_currency_format($line['amount']), 'Tax display has the correct amount ' . $when);
   }
 
   public function testTaxDisplay() {
@@ -59,10 +59,10 @@ class StoredTaxTest extends UbercartTestBase {
     uc_tax_rate_save($rate);
 
     $this->drupalGet('admin/store/config/taxes');
-    $this->assertText($rate->name, t('Tax was saved successfully.'));
+    $this->assertText($rate->name, 'Tax was saved successfully.');
 
     // $this->drupalGet("admin/store/config/taxes/manage/uc_tax_$rate->id");
-    // $this->assertText(t('Conditions'), t('Rules configuration linked to tax.'));
+    // $this->assertText(t('Conditions'), 'Rules configuration linked to tax.');
 
     $this->addToCart($this->product);
 
@@ -70,17 +70,17 @@ class StoredTaxTest extends UbercartTestBase {
     $this->drupalPostForm('cart', array(), 'Checkout');
     $this->assertText(
       t('Enter your billing address and information here.'),
-      t('Viewed cart page: Billing pane has been displayed.')
+      'Viewed cart page: Billing pane has been displayed.'
     );
-    $this->assertRaw($rate->name, t('Tax line item displayed.'));
-    $this->assertRaw(uc_currency_format($rate->rate * $this->product->price->value), t('Correct tax amount displayed.'));
+    $this->assertRaw($rate->name, 'Tax line item displayed.');
+    $this->assertRaw(uc_currency_format($rate->rate * $this->product->price->value), 'Correct tax amount displayed.');
 
     // Submit the checkout page.
     $edit = $this->populateCheckoutForm();
     $this->drupalPostForm('cart/checkout', $edit, t('Review order'));
     $this->assertRaw(t('Your order is almost complete.'));
-    $this->assertRaw($rate->name, t('Tax line item displayed.'));
-    $this->assertRaw(uc_currency_format($rate->rate * $this->product->price->value), t('Correct tax amount displayed.'));
+    $this->assertRaw($rate->name, 'Tax line item displayed.');
+    $this->assertRaw(uc_currency_format($rate->rate * $this->product->price->value), 'Correct tax amount displayed.');
 
     // Complete the review page.
     $this->drupalPostForm(NULL, array(), t('Submit order'));
@@ -124,7 +124,7 @@ class StoredTaxTest extends UbercartTestBase {
       \Drupal\uc_order\Entity\Order::load($order_id)->setStatusId('in_checkout')->save();
       $this->drupalPostForm('admin/store/orders/' . $order_id . '/edit', array(), t('Save changes'));
       $this->assertText(t('Order changes saved.'));
-      $this->assertFalse($this->loadTaxLine($order_id), t('The tax line was removed from the order when order status changed back to in_checkout.'));
+      $this->assertFalse($this->loadTaxLine($order_id), 'The tax line was removed from the order when order status changed back to in_checkout.');
 
       // Restore taxable product and ensure new tax is added.
       $rate->taxed_product_types = array('product');
@@ -134,7 +134,7 @@ class StoredTaxTest extends UbercartTestBase {
       $this->assertTaxLineCorrect($this->loadTaxLine($order_id), $rate->rate, 'when order status changed back to in_checkout');
     }
     else {
-      $this->fail(t('No order was created.'));
+      $this->fail('No order was created.');
     }
   }
 
