diff --git a/core/modules/menu_link_content/src/Tests/MenuLinkContentDeriverTest.php b/core/modules/menu_link_content/src/Tests/MenuLinkContentDeriverTest.php
index c7a1ae1..d3ad49b 100644
--- a/core/modules/menu_link_content/src/Tests/MenuLinkContentDeriverTest.php
+++ b/core/modules/menu_link_content/src/Tests/MenuLinkContentDeriverTest.php
@@ -7,7 +7,9 @@
namespace Drupal\menu_link_content\Tests;
+use Drupal\Component\Utility\SafeMarkup;
use Drupal\Core\Menu\MenuTreeParameters;
+use Drupal\Core\StringTranslation\TranslationWrapper;
use Drupal\menu_link_content\Entity\MenuLinkContent;
use Drupal\simpletest\KernelTestBase;
use Symfony\Component\Routing\Route;
@@ -45,7 +47,7 @@ public function testRediscover() {
// Set up a custom menu link pointing to a specific path.
MenuLinkContent::create([
- 'title' => 'Example',
+ 'title' => '',
'link' => [['uri' => 'internal:/example-path']],
'menu_name' => 'tools',
])->save();
@@ -67,6 +69,10 @@ public function testRediscover() {
/** @var \Drupal\Core\Menu\MenuLinkTreeElement $tree_element */
$tree_element = reset($menu_tree);
$this->assertEqual('route_name_2', $tree_element->link->getRouteName());
+ $title = (string) $tree_element->link->getTitle();
+ $this->assertFalse($title instanceof TranslationWrapper);
+ $this->assertIdentical('', $title);
+ $this->assertFalse(SafeMarkup::isSafe($title));
}
}