Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupal
Commits
f3af3911
Commit
f3af3911
authored
11 years ago
by
Alex Pott
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#1943282
by eporama, RobLoach: Fixed User Account Links Tests assumes certain menu link IDs.
parent
1c7dd34c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!7452
Issue #1797438. HTML5 validation is preventing form submit and not fully...
,
!789
Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php
+7
-3
7 additions, 3 deletions
...ules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php
with
7 additions
and
3 deletions
core/modules/user/lib/Drupal/user/Tests/UserAccountLinksTests.php
+
7
−
3
View file @
f3af3911
...
...
@@ -72,13 +72,17 @@ function testDisabledAccountLink() {
// Create an admin user and log in.
$this
->
drupalLogin
(
$this
->
drupalCreateUser
(
array
(
'access administration pages'
,
'administer menu'
)));
// Verify that the 'My account' link is enabled.
// Verify that the 'My account' link is enabled. Do not assume the value of
// auto-increment is 1. Use XPath to obtain input element id and name using
// the consistent label text.
$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'
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment