$this->assertTrue(empty($tracker_user),t('No about attribute is present on @user.',array('@user'=>$user)));
}
elseif($node->uid>0){
$this->assertTrue(!empty($tracker_user),t('About attribute is present on @user.',array('@user'=>$user)));
}
// Tests whether the property has been set for number of comments.
$tracker_replies=$this->xpath("//tr[@about='$url']//td[contains(@property, 'sioc:num_replies') and contains(@content, '0')]");
$this->assertTrue($tracker_replies,t('Num replies property and content attributes found on @user content.',array('@user'=>$user)));
// Tests that the appropriate RDFa markup to annotate the latest activity
// date has been added to the tracker output before comments have been
// posted, meaning the latest activity reflects changes to the node itself.
$isoDate=date('c',$node->changed);
$tracker_activity=$this->xpath("//tr[@about='$url']//td[contains(@property, 'dc:modified') and contains(@property, 'sioc:last_activity_date') and contains(@datatype, 'xsd:dateTime') and @content='$isoDate']");
$this->assertTrue(!empty($tracker_activity),t('Latest activity date and changed properties found when there are no comments on @user content. Latest activity date content is correct.',array('@user'=>$user)));
// Tests that the appropriate RDFa markup to annotate the latest activity
// date has been added to the tracker output after a comment is posted.
// Tests whether the property has been set for number of comments.
$tracker_replies=$this->xpath("//tr[@about='$url']//td[contains(@property, 'sioc:num_replies') and contains(@content, '1')]");
$this->assertTrue($tracker_replies,t('Num replies property and content attributes found on @user content.',array('@user'=>$user)));
// Need to query database directly to obtain last_activity_date because
// it cannot be accessed via node_load().
$result=db_query('SELECT t.changed FROM {tracker_node} t WHERE t.nid = (:nid)',array(':nid'=>$node->nid));
foreach($resultas$node){
$expected_last_activity_date=$node->changed;
}
$isoDate=date('c',$expected_last_activity_date);
$tracker_activity=$this->xpath("//tr[@about='$url']//td[@property='sioc:last_activity_date' and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($tracker_activity),t('Latest activity date found when there are comments on @user content. Latest activity date content is correct.',array('@user'=>$user)));