diff --git a/core/modules/rdf/lib/Drupal/rdf/Tests/StandardProfileTest.php b/core/modules/rdf/lib/Drupal/rdf/Tests/StandardProfileTest.php index 7cacda5..6447529 100644 --- a/core/modules/rdf/lib/Drupal/rdf/Tests/StandardProfileTest.php +++ b/core/modules/rdf/lib/Drupal/rdf/Tests/StandardProfileTest.php @@ -379,8 +379,13 @@ function _testArticleProperties($graph, $message_prefix) { * The EasyRDF graph object. */ function _testNodeCommentProperties($graph) { - // @todo Test relationship between comment and node once it is a field: - // https://drupal.org/node/731724 + // Relationship between node and comment. + $expected_value = array( + 'type' => 'uri', + 'value' => $this->articleCommentUri, + ); + $this->assertTrue($graph->hasProperty($this->articleUri, 'http://schema.org/comment', $expected_value), 'Relationship between node and comment found (schema:comment).'); + // Comment type. $this->assertEqual($graph->type($this->articleCommentUri), 'schema:Comment', 'Comment type was found (schema:Comment).'); diff --git a/core/profiles/standard/config/rdf.mapping.node.article.yml b/core/profiles/standard/config/rdf.mapping.node.article.yml index b5413de..7472877 100644 --- a/core/profiles/standard/config/rdf.mapping.node.article.yml +++ b/core/profiles/standard/config/rdf.mapping.node.article.yml @@ -22,6 +22,10 @@ fieldMappings: properties: - 'schema:author' mapping_type: 'rel' + comment: + properties: + - 'schema:comment' + mapping_type: 'rel' comment_count: properties: - 'schema:interactionCount'