diff --git a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php index 6780cf7..4920cf4 100644 --- a/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php +++ b/core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php @@ -74,11 +74,13 @@ function testDisabledAccountLink() { // Verify that the 'My account' link is enabled. $this->drupalGet('admin/structure/menu/manage/account'); - $this->assertFieldChecked('edit-links-mlid2-hidden', "The 'My account' link is enabled by default."); + $label = $this->xpath('//label[contains(.,:text)]/@for', array(':text' => 'Enable My account menu link')); + $this->assertFieldChecked((string) $label[0], "The 'My account' link is enabled by default."); // Disable the 'My account' link. + $input = $this->xpath('//input[@id=:field_id]/@name', array(':field_id' => (string)$label[0])); $edit = array( - 'links[mlid:2][hidden]' => FALSE, + (string) $input[0] => FALSE, ); $this->drupalPost('admin/structure/menu/manage/account', $edit, t('Save'));