diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-08 07:04:09 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-01-08 07:04:09 +0000 |
commit | 326e6273980ccf4ebae9ae9aab9633544c345a8c (patch) | |
tree | 081bc70ae73c62ad24f6704a0c35ce9a03011cb9 /modules/rdf | |
parent | 0dd161277046bab1ec994e8d756c4e99c717421e (diff) | |
download | brdo-326e6273980ccf4ebae9ae9aab9633544c345a8c.tar.gz brdo-326e6273980ccf4ebae9ae9aab9633544c345a8c.tar.bz2 |
#608036 follow-up by scor: Add attributes variable for profile.tpl.php. (with tests)
Diffstat (limited to 'modules/rdf')
-rw-r--r-- | modules/rdf/rdf.test | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test index 242f42399..bcbe943e3 100644 --- a/modules/rdf/rdf.test +++ b/modules/rdf/rdf.test @@ -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 nodes 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')); + } } |