updated core to 7.73
This commit is contained in:
+13
-10
@@ -301,7 +301,7 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
|
||||
|
||||
// Ensure the default bundle mapping for node is used. These attributes come
|
||||
// from the node default bundle definition.
|
||||
$blog_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
|
||||
$blog_title = $this->xpath("//div[@about='$url']/span[@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), 'Property dc:title is present in meta tag.');
|
||||
$this->assertTrue(!empty($blog_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
|
||||
@@ -313,13 +313,18 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
|
||||
*/
|
||||
function testAttributesInMarkup2() {
|
||||
$type = $this->drupalCreateContentType(array('type' => 'test_bundle_hook_install'));
|
||||
$node = $this->drupalCreateNode(array('type' => 'test_bundle_hook_install'));
|
||||
// Create node with single quotation mark title to ensure it does not get
|
||||
// escaped more than once.
|
||||
$node = $this->drupalCreateNode(array(
|
||||
'type' => 'test_bundle_hook_install',
|
||||
'title' => $this->randomName(8) . "'",
|
||||
));
|
||||
$isoDate = date('c', $node->changed);
|
||||
$url = url('node/' . $node->nid);
|
||||
$this->drupalGet('node/' . $node->nid);
|
||||
|
||||
// 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_title = $this->xpath("//div[@about='$url']/span[@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), 'Property dc:title is present in meta tag.');
|
||||
$this->assertTrue(!empty($test_bundle_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
|
||||
@@ -338,7 +343,7 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
|
||||
|
||||
// Ensure the default bundle mapping for node is used. These attributes come
|
||||
// from the node default bundle definition.
|
||||
$random_bundle_title = $this->xpath("//meta[@property='dc:title' and @content='$node->title']");
|
||||
$random_bundle_title = $this->xpath("//div[@about='$url']/span[@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), 'Property dc:title is present in meta tag.');
|
||||
$this->assertTrue(!empty($random_bundle_meta), 'RDF type is present on post. Properties dc:date and dc:created are present on post date.');
|
||||
@@ -436,7 +441,7 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
|
||||
$this->setCommentPreview(DRUPAL_OPTIONAL);
|
||||
$this->setCommentForm(TRUE);
|
||||
$this->setCommentSubject(TRUE);
|
||||
$this->setCommentSettings('comment_default_mode', COMMENT_MODE_THREADED, t('Comment paging changed.'));
|
||||
$this->setCommentSettings('comment_default_mode', COMMENT_MODE_THREADED, 'Comment paging changed.');
|
||||
|
||||
// Creates the nodes on which the test comments will be posted.
|
||||
$this->drupalLogin($this->web_user);
|
||||
@@ -456,15 +461,13 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
|
||||
|
||||
// Tests number of comments in teaser view.
|
||||
$this->drupalGet('node');
|
||||
$comment_count_teaser = $this->xpath('//div[contains(@typeof, "sioc:Item")]//li[contains(@class, "comment-comments")]/a[contains(@property, "sioc:num_replies") and contains(@content, "2") and @datatype="xsd:integer"]');
|
||||
$node_url = url('node/' . $this->node1->nid);
|
||||
$comment_count_teaser = $this->xpath('//div[@about=:node-url]/span[@property="sioc:num_replies" and @content="2" and @datatype="xsd:integer"]', array(':node-url' => $node_url));
|
||||
$this->assertTrue(!empty($comment_count_teaser), 'RDFa markup for the number of comments found on teaser view.');
|
||||
$comment_count_link = $this->xpath('//div[@about=:url]//a[contains(@property, "sioc:num_replies") and @rel=""]', array(':url' => url("node/{$this->node1->nid}")));
|
||||
$this->assertTrue(!empty($comment_count_link), 'Empty rel attribute found in comment count link.');
|
||||
|
||||
// Tests number of comments in full node view.
|
||||
$this->drupalGet('node/' . $this->node1->nid);
|
||||
$node_url = url('node/' . $this->node1->nid);
|
||||
$comment_count_teaser = $this->xpath('/html/head/meta[@about=:node-url and @property="sioc:num_replies" and @content="2" and @datatype="xsd:integer"]', array(':node-url' => $node_url));
|
||||
$comment_count_teaser = $this->xpath('//div[@about=:node-url]/span[@property="sioc:num_replies" and @content="2" and @datatype="xsd:integer"]', array(':node-url' => $node_url));
|
||||
$this->assertTrue(!empty($comment_count_teaser), 'RDFa markup for the number of comments found on full node view.');
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user