diff options
-rw-r--r-- | modules/user/user.test | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/user/user.test b/modules/user/user.test index c60f9c533..e2086d4fe 100644 --- a/modules/user/user.test +++ b/modules/user/user.test @@ -1565,11 +1565,13 @@ class UserAccountLinksUnitTests extends DrupalWebTestCase { // Verify that the 'My account' link is enabled. $this->drupalGet('admin/structure/menu/manage/user-menu'); - $this->assertFieldChecked('edit-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( - 'mlid:2[hidden]' => FALSE, + (string) $input[0] => FALSE, ); $this->drupalPost('admin/structure/menu/manage/user-menu', $edit, t('Save configuration')); |