index 7089121d5e..b651362fab 100644
--- a/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php
+++ b/core/tests/Drupal/Tests/Core/Path/PathMatcherTest.php
@@ -87,6 +87,14 @@ public function getMatchPathData() {
         ],
       ],
       [
+        // Hierarchical paths.
+        '/dummy/*/edit',
+        [
+          '/dummy/1/edit' => TRUE,
+          '/dummy/1/dummy-child/12/edit' => FALSE,
+        ],
+      ],
+      [
         // Single paths with '<front>'.
         "<front>",
         [
