summaryrefslogtreecommitdiff
path: root/modules/rdf
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-12-14 01:04:27 +0000
committerDries Buytaert <dries@buytaert.net>2010-12-14 01:04:27 +0000
commite44834ef9c326d6de04e3ea392ede618d73a962d (patch)
tree2b8c12bae33452e2955256a822a840274e1ec993 /modules/rdf
parent3361b3bfc26c8deb23f439ff7ecf8db6b8df0845 (diff)
downloadbrdo-e44834ef9c326d6de04e3ea392ede618d73a962d.tar.gz
brdo-e44834ef9c326d6de04e3ea392ede618d73a962d.tar.bz2
- Patch #819996 by scor: fixed RDFa generation.
Diffstat (limited to 'modules/rdf')
-rw-r--r--modules/rdf/rdf.test19
1 files changed, 19 insertions, 0 deletions
diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test
index 5ba2e37a6..0d20345ad 100644
--- a/modules/rdf/rdf.test
+++ b/modules/rdf/rdf.test
@@ -187,6 +187,25 @@ class RdfRdfaMarkupTestCase extends DrupalWebTestCase {
));
$this->assertTrue(!empty($image_rel), t('Attribute \'rel\' set on image field. Attribute \'resource\' is also set.'));
+
+ // Edits the node to add tags.
+ $tag1 = $this->randomName(8);
+ $tag2 = $this->randomName(8);
+ $edit = array();
+ $edit['field_tags[' . LANGUAGE_NONE . ']'] = "$tag1, $tag2";
+ $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save'));
+ // Ensures the RDFa markup for the relationship between the node and its
+ // tags is correct.
+ $term_rdfa_meta = $this->xpath('//div[@about=:node-url and contains(@typeof, "sioc:Item") and contains(@typeof, "foaf:Document")]//ul[@class="links"]/li[@rel="dc:subject"]/a[@typeof="skos:Concept" and text()=:term-name]', array(
+ ':node-url' => url('node/' . $node->nid),
+ ':term-name' => $tag1,
+ ));
+ $this->assertTrue(!empty($term_rdfa_meta), t('Property dc:subject is present for the tag1 field item.'));
+ $term_rdfa_meta = $this->xpath('//div[@about=:node-url and contains(@typeof, "sioc:Item") and contains(@typeof, "foaf:Document")]//ul[@class="links"]/li[@rel="dc:subject"]/a[@typeof="skos:Concept" and text()=:term-name]', array(
+ ':node-url' => url('node/' . $node->nid),
+ ':term-name' => $tag2,
+ ));
+ $this->assertTrue(!empty($term_rdfa_meta), t('Property dc:subject is present for the tag2 field item.'));
}
}