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
326e6273
Commit
326e6273
authored
15 years ago
by
Angie Byron
Browse files
Options
Downloads
Patches
Plain Diff
#608036
follow-up by scor: Add attributes variable for profile.tpl.php. (with tests)
parent
0dd16127
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
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
modules/rdf/rdf.test
+17
-1
17 additions, 1 deletion
modules/rdf/rdf.test
modules/user/user-profile.tpl.php
+1
-1
1 addition, 1 deletion
modules/user/user-profile.tpl.php
with
18 additions
and
2 deletions
modules/rdf/rdf.test
+
17
−
1
View file @
326e6273
...
...
@@ -126,7 +126,7 @@ class RdfMappingDefinitionTestCase extends DrupalWebTestCase {
public
static
function
getInfo
()
{
return
array
(
'name'
=>
'RDF mapping definition functionality'
,
'description'
=>
'Test the different types of RDF mappings and ensure the proper RDFa markup in included in node pages.'
,
'description'
=>
'Test the different types of RDF mappings and ensure the proper RDFa markup in included in node
s and user profile
pages.'
,
'group'
=>
'RDF'
,
);
}
...
...
@@ -187,4 +187,20 @@ class RdfMappingDefinitionTestCase extends DrupalWebTestCase {
$this
->
assertRaw
(
'property="dc:title"'
);
$this
->
assertRaw
(
'property="dc:date dc:created"'
);
}
/**
* Create a random user and ensure the default mapping for user is used.
*/
function
testUserProfilesAttributesInMarkup
()
{
// Create a user with access to user profiles.
$user
=
$this
->
drupalCreateUser
(
array
(
'access user profiles'
));
$this
->
drupalLogin
(
$user
);
// Browse to the user profile page.
$this
->
drupalGet
(
'user/'
.
$user
->
uid
);
// Ensure the default bundle mapping for user is used. These attributes come
// from the user default bundle definition.
$profile_url
=
url
(
'user/'
.
$user
->
uid
);
$user_profile_about
=
$this
->
xpath
(
"//div[@class='profile' and @typeof='sioc:User' and @about='
$profile_url
']"
);
$this
->
assertTrue
(
!
empty
(
$user_profile_about
),
t
(
'RDFa markup found on user profile page'
));
}
}
This diff is collapsed.
Click to expand it.
modules/user/user-profile.tpl.php
+
1
−
1
View file @
326e6273
...
...
@@ -33,6 +33,6 @@
* @see template_preprocess_user_profile()
*/
?>
<div
class=
"profile"
>
<div
class=
"profile"
<?php
print
$attributes
;
?>
>
<?php
print
render
(
$user_profile
);
?>
</div>
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