diff --git a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityOperationsTest.php b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityOperationsTest.php
index 2d142ca..776021d 100644
--- a/core/modules/system/lib/Drupal/system/Tests/Entity/EntityOperationsTest.php
+++ b/core/modules/system/lib/Drupal/system/Tests/Entity/EntityOperationsTest.php
@@ -51,7 +51,7 @@ public function testEntityOperationAlter() {
     foreach ($roles as $role) {
       $uri = $role->uri();
       $this->assertLinkByHref($uri['path'] . '/test_operation');
-      $this->assertLink('Test Operation: ' . $role->label());
+      $this->assertLink(format_string('Test Operation: @label', array('@label' => $role->label())));
     }
   }
 
diff --git a/core/modules/system/tests/modules/entity_test/entity_test.module b/core/modules/system/tests/modules/entity_test/entity_test.module
index 015e494..24ef1b6 100644
--- a/core/modules/system/tests/modules/entity_test/entity_test.module
+++ b/core/modules/system/tests/modules/entity_test/entity_test.module
@@ -425,7 +425,7 @@ function entity_test_entity_predelete(EntityInterface $entity) {
 function entity_test_entity_operation_alter(array &$operations, EntityInterface $entity) {
   $uri = $entity->uri();
   $operations['test_operation'] = array(
-    'title' => 'Test Operation: ' . $entity->label(),
+    'title' => format_string('Test Operation: @label', array('@label' => $entity->label())),
     'href' => $uri['path'] . '/test_operation',
     'weight' => 50,
   );
