From 0a01a892d24531d0fe82ac35546e65795721062f Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Thu, 13 Jun 2013 09:00:19 +0100 Subject: [PATCH] Issue #2004408 followup by tim.plunkett: Random failure: Allow modules to alter the result of EntityListController::getOperations. --- .../lib/Drupal/system/Tests/Entity/EntityOperationsTest.php | 2 +- .../modules/system/tests/modules/entity_test/entity_test.module | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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, );