diff --git a/core/modules/system/tests/src/Unit/Controller/SystemControllerTest.php b/core/modules/system/tests/src/Unit/Controller/SystemControllerTest.php
index e5ec1da..ab227a0 100644
--- a/core/modules/system/tests/src/Unit/Controller/SystemControllerTest.php
+++ b/core/modules/system/tests/src/Unit/Controller/SystemControllerTest.php
@@ -298,6 +298,13 @@ public function providerTestSetLinkActiveClass() {
       }
     }
 
+    // Test case to verify that the 'active' class is not added multiple times.
+    $data[] = [
+      0 => ['#markup' => '<a data-drupal-link-system-path="&lt;front&gt;">Once</a> <a data-drupal-link-system-path="&lt;front&gt;">Twice</a>'],
+      1 => ['path' => '', 'front' => TRUE, 'language' => 'en', 'query' => []],
+      2 => ['#markup' => '<a data-drupal-link-system-path="&lt;front&gt;" class="active">Once</a> <a data-drupal-link-system-path="&lt;front&gt;" class="active">Twice</a>'],
+    ];
+
     return $data;
   }
 
