2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
$this->assertTrue($graph->hasProperty($node_uri,'http://rdfs.org/sioc/ns#num_replies',$expected_value),'Number of comments found in RDF output (sioc:num_replies).');
// Node relation to author.
$expected_value=array(
'type'=>'uri',
'value'=>$user_uri,
);
if($node->getOwnerId()==0){
$this->assertFalse($graph->hasProperty($node_uri,'http://rdfs.org/sioc/ns#has_creator',$expected_value),'No relation to author found in RDF output (sioc:has_creator).');
}
elseif($node->getOwnerId()>0){
$this->assertTrue($graph->hasProperty($node_uri,'http://rdfs.org/sioc/ns#has_creator',$expected_value),'Relation to author found in RDF output (sioc:has_creator).');
$this->assertTrue($graph->hasProperty($node_uri,'http://rdfs.org/sioc/ns#last_activity_date',$expected_value),'Last activity date found in RDF output (sioc:last_activity_date).');
// Adds new comment to ensure the tracker is updated accordingly.
$this->assertTrue($graph->hasProperty($node_uri,'http://rdfs.org/sioc/ns#num_replies',$expected_value),'Number of comments found in RDF output (sioc:num_replies).');
// Last updated due to new comment.
// last_activity_date needs to be queried from the database directly because
// it cannot be accessed via node_load().
$expected_last_activity_date=db_query('SELECT t.changed FROM {tracker_node} t WHERE t.nid = (:nid)',array(':nid'=>$node->id()))->fetchField();
$this->assertTrue($graph->hasProperty($node_uri,'http://rdfs.org/sioc/ns#last_activity_date',$expected_value),'Last activity date after new comment has been posted found in RDF output (sioc:last_activity_date).');