diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php index 865878a..9bb2964 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php @@ -61,8 +61,11 @@ function testSecondaryMenu() { $this->drupalGet(''); // For a logged-out user, expect no secondary links. - $element = $this->xpath('//ul[@id=:menu_id]', array(':menu_id' => 'secondary-menu')); - $this->assertEqual(count($element), 0, 'No secondary-menu for logged-out users.'); + $tree = menu_build_tree('account'); + $this->assertEqual(count($tree), 1, 'The secondary links menu contains only one menu link.'); + $link = reset($tree); + $link = $link['link']; + $this->assertTrue((bool) $link->hidden, 'The menu link is hidden.'); } /**