diff --git a/core/modules/tracker/src/Controller/TrackerController.php b/core/modules/tracker/src/Controller/TrackerController.php index eb14b5477a..32178ce363 100644 --- a/core/modules/tracker/src/Controller/TrackerController.php +++ b/core/modules/tracker/src/Controller/TrackerController.php @@ -100,7 +100,7 @@ public static function create(ContainerInterface $container) { * The title. */ public function getTitle(UserInterface $user) { - return $user->getAccountName(); + return $user->getDisplayName(); } /** diff --git a/core/modules/tracker/tests/src/Kernel/TrackerLegacyTest.php b/core/modules/tracker/tests/src/Kernel/TrackerLegacyTest.php new file mode 100644 index 0000000000..238b380e7c --- /dev/null +++ b/core/modules/tracker/tests/src/Kernel/TrackerLegacyTest.php @@ -0,0 +1,44 @@ +installEntitySchema('node'); + $this->installSchema('node', 'node_access'); + $this->installSchema('tracker', 'tracker_node'); + $this->installSchema('tracker', 'tracker_user'); + } + + /** + * @expectedDeprecation tracker_page is deprecated in drupal:8.8.0 and is removed from drupal:9.0.0. Use \Drupal\tracker\Controller\TrackerController::buildContent() instead. See https://www.drupal.org/node/3030645 + */ + public function testDeprecatedTrackerPage() { + module_load_include('inc', 'tracker', 'tracker.pages'); + $this->assertNotEmpty(tracker_page()); + } + +}