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
// Tests the reply_of relationship of a first level comment.
$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('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('No RDFa markup referring to the comment itself is present.'));
// Tests the reply_of relationship of a second level comment.
$result=$this->xpath("id('comments')//div[@class='comment' and position()=1]//span[@rel='sioc:reply_of' and @resource=:node]",array(':node'=>url("node/{$this->node1->nid}")));
$this->assertEqual(1,count($result),t('RDFa markup referring to the node is present.'));
$result=$this->xpath("id('comments')//div[@class='comment' and position()=1]//span[@rel='sioc:reply_of' and @resource=:comment]",array(':comment'=>url('comment/1#comment-1')));
$this->assertEqual(1,count($result),t('RDFa markup referring to the parent comment is present.'));
$blog_title=$this->xpath("//meta[@property='dc:title' and @content='$node->title']");
$blog_meta=$this->xpath("//div[(@about='$url') and (@typeof='sioct:Weblog')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($blog_title),t('Property dc:title is present in meta tag.'));
$this->assertTrue(!empty($blog_meta),t('RDF type is present on post. Properties dc:date and dc:created are present on post date.'));
}
/**
...
...
@@ -281,13 +284,15 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
// Ensure the mapping defined in rdf_module.test is used.
$test_bundle_title=$this->xpath("//meta[@property='dc:title' and @content='$node->title']");
$test_bundle_meta=$this->xpath("//div[(@about='$url') and contains(@typeof, 'foo:mapping_install1') and contains(@typeof, 'bar:mapping_install2')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($test_bundle_title),t('Propertydc:title is present in meta tag.'));
$this->assertTrue(!empty($test_bundle_meta),t('RDF type is present on post. Properties dc:date and dc:created are present on post date.'));
}
/**
...
...
@@ -297,13 +302,16 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
$random_bundle_title=$this->xpath("//meta[@property='dc:title' and @content='$node->title']");
$random_bundle_meta=$this->xpath("//div[(@about='$url') and contains(@typeof, 'sioc:Item') and contains(@typeof, 'foaf:Document')]//span[contains(@property, 'dc:date') and contains(@property, 'dc:created') and @datatype='xsd:dateTime' and @content='$isoDate']");
$this->assertTrue(!empty($random_bundle_title),t('Property dc:title is present in meta tag.'));
$this->assertTrue(!empty($random_bundle_meta),t('RDF type is present on post. Properties dc:date and dc:created are present on post date.'));