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 2d142ca2bbe..776021d4f20 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 @@ class EntityOperationsTest extends WebTestBase { 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 015e4940e1d..24ef1b65e52 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, );