Some tests in rdf.test are not very robust and do not contain a full xpath expression.

    $this->assertRaw('property="dc:title"');

It seems we're also missing a test for the relation between a comment and its parent node and parent comment. Same for the node title in full node mode (drupal_add_html_head($element, 'rdf_node_title');)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Anonymous’s picture

Assigned: Unassigned » linclark

Unless you're already working on this, I can work on this tomorrow.

Anonymous’s picture

This patch replaces all the assertRaw statements with XPath checks. It also checks the title in full node view by checking the content attribute of the meta tag.

I am going to break the test for the relation between a comment and its parent node and parent comment into a separate issue because that test will fail until some other patches are committed.

Anonymous’s picture

Status: Active » Needs review
scor’s picture

Status: Needs review » Needs work

#694314: RDF tests for parent/comment relationship now duplicate since we now have proper RDFa markup for comment body. Tests can be merged with this issue.

Stefan Freudenberg’s picture

Added tests for the relation between a comment and its parent node and parent comment and removed trailing whitespace.

scor’s picture

+++ modules/comment/comment.test	21 Apr 2010 05:39:21 -0000
@@ -1166,6 +1166,10 @@ class CommentRdfaTestCase extends Commen
+    $result = $this->xpath("id('comments')//div[@class='comment' and position()=0]//span[@rel='sioc:reply_of' and @resource=:node]", array(':node' => url("node/{$this->node1->nid}")));
+    $this->assertEqual(1, count($result), t('Assert RDFa markup referring to the node is present.'));
+    $result = $this->xpath("id('comments')//div[@class='comment' and position()=0]//span[@rel='sioc:reply_of' and @resource=:comment]", array(':comment' => url('comment/1#comment-1')));
+    $this->assertFalse($result, t('Assert no RDFa markup referring to the comment itself is present. '));

Let's bundle this first hunk into the new function you create afterwards.

Powered by Dreditor.

Stefan Freudenberg’s picture

Renamed function to cover both tests and added custom messages.

Stefan Freudenberg’s picture

Status: Needs work » Needs review

Forgot to set the status.

Stefan Freudenberg’s picture

Removed a trailing whitespace.

Stefan Freudenberg’s picture

Fixed a typo and adjusted test messages.

scor’s picture

Assigned: linclark » Unassigned
Status: Needs review » Reviewed & tested by the community

we're good to go.

cwgordon7’s picture

Fixed two small whitespace issues. Should still be rtbc.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Committed to HEAD. Thanks!

Status: Fixed » Closed (fixed)
Issue tags: -Needs tests, -RDF

Automatically closed -- issue fixed for 2 weeks with no activity.