diff -u b/core/modules/system/src/Tests/Common/RenderElementTypesTest.php b/core/modules/system/src/Tests/Common/RenderElementTypesTest.php --- b/core/modules/system/src/Tests/Common/RenderElementTypesTest.php +++ b/core/modules/system/src/Tests/Common/RenderElementTypesTest.php @@ -194,7 +194,7 @@ 'value' => array( '#type' => 'system_compact_link', ), - 'expected' => '//div[@class="compact-link"]/a[contains(@href, "admin/compact/on") and text()="Hide descriptions"]', + 'expected' => '//div[@class="compact-link"]/a[contains(@href, "admin/compact/on?") and text()="Hide descriptions"]', ), array( 'name' => "#type 'system_compact_link' when adding extra attributes", @@ -204,7 +204,7 @@ 'class' => array('kittens-rule'), ), ), - 'expected' => '//div[@class="compact-link"]/a[contains(@href, "admin/compact/on") and @class="kittens-rule" and text()="Hide descriptions"]', + 'expected' => '//div[@class="compact-link"]/a[contains(@href, "admin/compact/on?") and @class="kittens-rule" and text()="Hide descriptions"]', ), ); @@ -222,7 +222,7 @@ 'value' => array( '#type' => 'system_compact_link', ), - 'expected' => '//div[@class="compact-link"]/a[contains(@href, "admin/compact/off") and text()="Show descriptions"]', + 'expected' => '//div[@class="compact-link"]/a[contains(@href, "admin/compact?") and text()="Show descriptions"]', ); $xml = new \SimpleXMLElement(drupal_render($element['value']));