summaryrefslogtreecommitdiff
path: root/modules/rdf
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-08-05 23:53:39 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-08-05 23:53:39 +0000
commit25171a17f626695ecf984cc44b60d3eae1310b4c (patch)
tree3268ef89294cbb96d0875d665012c4ff16d8c68a /modules/rdf
parentcacd044a6398df92de68c5aea31987ac0fff507a (diff)
downloadbrdo-25171a17f626695ecf984cc44b60d3eae1310b4c.tar.gz
brdo-25171a17f626695ecf984cc44b60d3eae1310b4c.tar.bz2
Reverting #500866. Needs more discussion.
Diffstat (limited to 'modules/rdf')
-rw-r--r--modules/rdf/rdf.test112
1 files changed, 56 insertions, 56 deletions
diff --git a/modules/rdf/rdf.test b/modules/rdf/rdf.test
index 82da0c272..137bb7c78 100644
--- a/modules/rdf/rdf.test
+++ b/modules/rdf/rdf.test
@@ -25,17 +25,17 @@ class RdfMappingHookTestCase extends DrupalWebTestCase {
function testMapping() {
// Test that the mapping is returned correctly by the hook.
$mapping = rdf_mapping_load('test_entity', 'test_bundle');
- $this->assertIdentical($mapping['rdftype'], array('sioc:Post'), 'Mapping for rdftype is sioc:Post.');
- $this->assertIdentical($mapping['title'], array('predicates' => array('dc:title')), 'Mapping for title is dc:title.');
+ $this->assertIdentical($mapping['rdftype'], array('sioc:Post'), t('Mapping for rdftype is sioc:Post.'));
+ $this->assertIdentical($mapping['title'], array('predicates' => array('dc:title')), t('Mapping for title is dc:title.'));
$this->assertIdentical($mapping['created'], array(
'predicates' => array('dc:created'),
'datatype' => 'xsd:dateTime',
'callback' => 'date_iso8601',
- ), 'Mapping for created is dc:created with datatype xsd:dateTime and callback date_iso8601.');
- $this->assertIdentical($mapping['uid'], array('predicates' => array('sioc:has_creator', 'dc:creator'), 'type' => 'rel'), 'Mapping for uid is sioc:has_creator and dc:creator, and type is rel.');
+ ), t('Mapping for created is dc:created with datatype xsd:dateTime and callback date_iso8601.'));
+ $this->assertIdentical($mapping['uid'], array('predicates' => array('sioc:has_creator', 'dc:creator'), 'type' => 'rel'), t('Mapping for uid is sioc:has_creator and dc:creator, and type is rel.'));
$mapping = rdf_mapping_load('test_entity', 'test_bundle_no_mapping');
- $this->assertEqual($mapping, array(), 'Empty array returned when an entity type, bundle pair has no mapping.');
+ $this->assertEqual($mapping, array(), t('Empty array returned when an entity type, bundle pair has no mapping.'));
}
}
@@ -180,13 +180,13 @@ class RdfRdfaMarkupTestCase extends DrupalWebTestCase {
$file_rel = $this->xpath('//div[contains(@about, :node-uri)]//div[contains(@rel, "rdfs:seeAlso") and contains(@resource, ".txt")]', array(
':node-uri' => 'node/' . $nid,
));
- $this->assertTrue(!empty($file_rel), 'Attribute \'rel\' set on file field. Attribute \'resource\' is also set.');
+ $this->assertTrue(!empty($file_rel), t('Attribute \'rel\' set on file field. Attribute \'resource\' is also set.'));
$image_rel = $this->xpath('//div[contains(@about, :node-uri)]//div[contains(@rel, "rdfs:seeAlso") and contains(@resource, :image)]//img[contains(@typeof, "foaf:Image")]', array(
':node-uri' => 'node/' . $nid,
':image' => $image_filename,
));
- $this->assertTrue(!empty($image_rel), 'Attribute \'rel\' set on image field. Attribute \'resource\' is also set.');
+ $this->assertTrue(!empty($image_rel), t('Attribute \'rel\' set on image field. Attribute \'resource\' is also set.'));
}
}
@@ -209,7 +209,7 @@ class RdfCrudTestCase extends DrupalWebTestCase {
function testCRUD() {
// Verify loading of a default mapping.
$mapping = _rdf_mapping_load('test_entity', 'test_bundle');
- $this->assertTrue(count($mapping), 'Default mapping was found.');
+ $this->assertTrue(count($mapping), t('Default mapping was found.'));
// Verify saving a mapping.
$mapping = array(
@@ -226,35 +226,35 @@ class RdfCrudTestCase extends DrupalWebTestCase {
),
),
);
- $this->assertTrue(rdf_mapping_save($mapping) === SAVED_NEW, 'Mapping was saved.');
+ $this->assertTrue(rdf_mapping_save($mapping) === SAVED_NEW, t('Mapping was saved.'));
// Read the raw record from the {rdf_mapping} table.
$result = db_query('SELECT * FROM {rdf_mapping} WHERE type = :type AND bundle = :bundle', array(':type' => $mapping['type'], ':bundle' => $mapping['bundle']));
$stored_mapping = $result->fetchAssoc();
$stored_mapping['mapping'] = unserialize($stored_mapping['mapping']);
- $this->assertEqual($mapping, $stored_mapping, 'Mapping was stored properly in the {rdf_mapping} table.');
+ $this->assertEqual($mapping, $stored_mapping, t('Mapping was stored properly in the {rdf_mapping} table.'));
// Verify loading of saved mapping.
- $this->assertEqual($mapping['mapping'], _rdf_mapping_load($mapping['type'], $mapping['bundle']), 'Saved mapping loaded successfully.');
+ $this->assertEqual($mapping['mapping'], _rdf_mapping_load($mapping['type'], $mapping['bundle']), t('Saved mapping loaded successfully.'));
// Verify updating of mapping.
$mapping['mapping']['title'] = array(
'predicates' => array('dc2:bar2'),
);
- $this->assertTrue(rdf_mapping_save($mapping) === SAVED_UPDATED, 'Mapping was updated.');
+ $this->assertTrue(rdf_mapping_save($mapping) === SAVED_UPDATED, t('Mapping was updated.'));
// Read the raw record from the {rdf_mapping} table.
$result = db_query('SELECT * FROM {rdf_mapping} WHERE type = :type AND bundle = :bundle', array(':type' => $mapping['type'], ':bundle' => $mapping['bundle']));
$stored_mapping = $result->fetchAssoc();
$stored_mapping['mapping'] = unserialize($stored_mapping['mapping']);
- $this->assertEqual($mapping, $stored_mapping, 'Updated mapping was stored properly in the {rdf_mapping} table.');
+ $this->assertEqual($mapping, $stored_mapping, t('Updated mapping was stored properly in the {rdf_mapping} table.'));
// Verify loading of saved mapping.
- $this->assertEqual($mapping['mapping'], _rdf_mapping_load($mapping['type'], $mapping['bundle']), 'Saved mapping loaded successfully.');
+ $this->assertEqual($mapping['mapping'], _rdf_mapping_load($mapping['type'], $mapping['bundle']), t('Saved mapping loaded successfully.'));
// Verify deleting of mapping.
- $this->assertTrue(rdf_mapping_delete($mapping['type'], $mapping['bundle']), 'Mapping was deleted.');
- $this->assertFalse(_rdf_mapping_load($mapping['type'], $mapping['bundle']), 'Deleted mapping is no longer found in the database.');
+ $this->assertTrue(rdf_mapping_delete($mapping['type'], $mapping['bundle']), t('Mapping was deleted.'));
+ $this->assertFalse(_rdf_mapping_load($mapping['type'], $mapping['bundle']), t('Deleted mapping is no longer found in the database.'));
}
}
@@ -285,8 +285,8 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
// from the node default bundle definition.
$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), '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.');
+ $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.'));
}
/**
@@ -303,8 +303,8 @@ 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), '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.');
+ $this->assertTrue(!empty($test_bundle_title), t('Property dc: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.'));
}
/**
@@ -322,8 +322,8 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
// from the node default bundle definition.
$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), '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.');
+ $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.'));
}
/**
@@ -345,19 +345,19 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
$user2_profile_about = $this->xpath('//div[@class="profile" and @typeof="sioc:UserAccount" and @about=:account-uri]', array(
':account-uri' => $account_uri,
));
- $this->assertTrue(!empty($user2_profile_about), 'RDFa markup found on user profile page');
+ $this->assertTrue(!empty($user2_profile_about), t('RDFa markup found on user profile page'));
$user_account_holder = $this->xpath('//meta[contains(@typeof, "foaf:Person") and @about=:person-uri and @resource=:account-uri and contains(@rel, "foaf:account")]', array(
':person-uri' => $person_uri,
':account-uri' => $account_uri,
));
- $this->assertTrue(!empty($user_account_holder), 'URI created for account holder and username set on sioc:UserAccount.');
+ $this->assertTrue(!empty($user_account_holder), t('URI created for account holder and username set on sioc:UserAccount.'));
$user_username = $this->xpath('//meta[@about=:account-uri and contains(@property, "foaf:name") and @content=:username]', array(
':account-uri' => $account_uri,
':username' => $username,
));
- $this->assertTrue(!empty($user_username), 'foaf:name set on username.');
+ $this->assertTrue(!empty($user_username), t('foaf:name set on username.'));
// User 2 creates node.
$this->drupalLogin($user2);
@@ -369,7 +369,7 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
$author_about = $this->xpath('//a[@typeof="sioc:UserAccount" and @about=:account-uri and @property="foaf:name" and contains(@xml:lang, "")]', array(
':account-uri' => $account_uri,
));
- $this->assertTrue(!empty($author_about), 'RDFa markup found on author information on post. xml:lang on username is set to empty string.');
+ $this->assertTrue(!empty($author_about), t('RDFa markup found on author information on post. xml:lang on username is set to empty string.'));
}
/**
@@ -387,7 +387,7 @@ class RdfMappingDefinitionTestCase extends TaxonomyWebTestCase {
':term-url' => $term_url,
':term-name' => $term_name,
));
- $this->assertTrue(!empty($term_rdfa_meta), 'RDFa markup found on term page.');
+ $this->assertTrue(!empty($term_rdfa_meta), t('RDFa markup found on term page.'));
}
}
@@ -439,15 +439,15 @@ 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"]');
- $this->assertTrue(!empty($comment_count_teaser), 'RDFa markup for the number of comments found on teaser view.');
+ $this->assertTrue(!empty($comment_count_teaser), t('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.');
+ $this->assertTrue(!empty($comment_count_link), t('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));
- $this->assertTrue(!empty($comment_count_teaser), 'RDFa markup for the number of comments found on full node view.');
+ $this->assertTrue(!empty($comment_count_teaser), t('RDFa markup for the number of comments found on full node view.'));
}
/**
@@ -485,10 +485,10 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
$this->_testBasicCommentRdfaMarkup($comment2, $anonymous_user);
// Tests the RDFa markup for the homepage (specific to anonymous comments).
$comment_homepage = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//span[@rel="sioc:has_creator"]/a[contains(@class, "username") and @typeof="sioc:UserAccount" and @property="foaf:name" and @href="http://example.org/" and contains(@rel, "foaf:page")]');
- $this->assertTrue(!empty($comment_homepage), 'RDFa markup for the homepage of anonymous user found.');
+ $this->assertTrue(!empty($comment_homepage), t('RDFa markup for the homepage of anonymous user found.'));
// There should be no about attribute on anonymous comments.
$comment_homepage = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//span[@rel="sioc:has_creator"]/a[@about]');
- $this->assertTrue(empty($comment_homepage), 'No about attribute is present on anonymous user comment.');
+ $this->assertTrue(empty($comment_homepage), t('No about attribute is present on anonymous user comment.'));
// Tests comment #2 as logged in user.
$this->drupalLogin($this->web_user);
@@ -496,10 +496,10 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
$this->_testBasicCommentRdfaMarkup($comment2, $anonymous_user);
// Tests the RDFa markup for the homepage (specific to anonymous comments).
$comment_homepage = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//span[@rel="sioc:has_creator"]/a[contains(@class, "username") and @typeof="sioc:UserAccount" and @property="foaf:name" and @href="http://example.org/" and contains(@rel, "foaf:page")]');
- $this->assertTrue(!empty($comment_homepage), "RDFa markup for the homepage of anonymous user found.");
+ $this->assertTrue(!empty($comment_homepage), t("RDFa markup for the homepage of anonymous user found."));
// There should be no about attribute on anonymous comments.
$comment_homepage = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//span[@rel="sioc:has_creator"]/a[@about]');
- $this->assertTrue(empty($comment_homepage), "No about attribute is present on anonymous user comment.");
+ $this->assertTrue(empty($comment_homepage), t("No about attribute is present on anonymous user comment."));
}
/**
@@ -512,9 +512,9 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
// 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), 'RDFa markup referring to the node is present.');
+ $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, 'No RDFa markup referring to the comment itself is present.');
+ $this->assertFalse($result, t('No RDFa markup referring to the comment itself is present.'));
// Posts a reply to the first comment.
$this->drupalGet('comment/reply/' . $this->node1->nid . '/' . $comments[0]->id);
@@ -522,9 +522,9 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
// 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), 'RDFa markup referring to the node is present.');
+ $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), 'RDFa markup referring to the parent comment is present.');
+ $this->assertEqual(1, count($result), t('RDFa markup referring to the parent comment is present.'));
}
/**
@@ -539,17 +539,17 @@ class RdfCommentAttributesTestCase extends CommentHelperCase {
*/
function _testBasicCommentRdfaMarkup($comment, $account = array()) {
$comment_container = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]');
- $this->assertTrue(!empty($comment_container), "Comment RDF type for comment found.");
+ $this->assertTrue(!empty($comment_container), t("Comment RDF type for comment found."));
$comment_title = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//h3[@property="dc:title"]');
- $this->assertEqual((string) $comment_title[0]->a, $comment->subject, "RDFa markup for the comment title found.");
+ $this->assertEqual((string)$comment_title[0]->a, $comment->subject, t("RDFa markup for the comment title found."));
$comment_date = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//*[contains(@property, "dc:date") and contains(@property, "dc:created")]');
- $this->assertTrue(!empty($comment_date), "RDFa markup for the date of the comment found.");
+ $this->assertTrue(!empty($comment_date), t("RDFa markup for the date of the comment found."));
// The author tag can be either a or span
$comment_author = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//span[@rel="sioc:has_creator"]/*[contains(@class, "username") and @typeof="sioc:UserAccount" and @property="foaf:name"]');
$name = empty($account["name"]) ? $this->web_user->name : $account["name"] . " (not verified)";
- $this->assertEqual((string) $comment_author[0], $name, "RDFa markup for the comment author found.");
+ $this->assertEqual((string)$comment_author[0], $name, t("RDFa markup for the comment author found."));
$comment_body = $this->xpath('//div[contains(@class, "comment") and contains(@typeof, "sioct:Comment")]//div[@class="content"]//div[contains(@class, "comment-body")]//div[@property="content:encoded"]');
- $this->assertEqual((string) $comment_body[0]->p, $comment->comment, "RDFa markup for the comment body found.");
+ $this->assertEqual((string)$comment_body[0]->p, $comment->comment, t("RDFa markup for the comment body found."));
}
}
@@ -610,35 +610,35 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase {
// success of the following tests, but making it explicit will make
// debugging easier in case of failure.
$tracker_about = $this->xpath('//tr[@about=:url]', array(':url' => $url));
- $this->assertTrue(!empty($tracker_about), 'About attribute found on table row for ' . $user . ' content.');
+ $this->assertTrue(!empty($tracker_about), t('About attribute found on table row for @user content.', array('@user'=> $user)));
// Tests whether the title has the correct property attribute.
$tracker_title = $this->xpath('//tr[@about=:url]/td[@property="dc:title" and @datatype=""]', array(':url' => $url));
- $this->assertTrue(!empty($tracker_title), 'Title property attribute found on ' . $user . ' content.');
+ $this->assertTrue(!empty($tracker_title), t('Title property attribute found on @user content.', array('@user'=> $user)));
// Tests whether the relationship between the content and user has been set.
$tracker_user = $this->xpath('//tr[@about=:url]//td[contains(@rel, "sioc:has_creator")]//*[contains(@typeof, "sioc:UserAccount") and contains(@property, "foaf:name")]', array(':url' => $url));
- $this->assertTrue(!empty($tracker_user), 'Typeof and name property attributes found on ' . $user . '.');
+ $this->assertTrue(!empty($tracker_user), t('Typeof and name property attributes found on @user.', array('@user'=> $user)));
// There should be an about attribute on logged in users and no about
// attribute for anonymous users.
$tracker_user = $this->xpath('//tr[@about=:url]//td[@rel="sioc:has_creator"]/*[@about]', array(':url' => $url));
if ($node->uid == 0) {
- $this->assertTrue(empty($tracker_user), 'No about attribute is present on ' . $user . '.');
+ $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), 'About attribute is present on ' . $user . '.');
+ $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") and @datatype="xsd:integer"]', array(':url' => $url));
- $this->assertTrue($tracker_replies, 'Num replies property and content attributes found on ' . $user . ' content.');
+ $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=:date]', array(':url' => $url, ':date' => $isoDate));
- $this->assertTrue(!empty($tracker_activity), 'Latest activity date and changed properties found when there are no comments on ' . $user . ' content. Latest activity date content is correct.');
+ $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.
@@ -651,7 +651,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase {
// 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") and @datatype="xsd:integer"]', array(':url' => $url));
- $this->assertTrue($tracker_replies, 'Num replies property and content attributes found on ' . $user . ' content.');
+ $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().
@@ -661,7 +661,7 @@ class RdfTrackerAttributesTestCase extends DrupalWebTestCase {
}
$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=:date]', array(':url' => $url, ':date' => $isoDate));
- $this->assertTrue(!empty($tracker_activity), 'Latest activity date found when there are comments on ' . $user . ' content. Latest activity date content is correct.');
+ $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)));
}
}
@@ -688,9 +688,9 @@ class RdfGetRdfNamespacesTestCase extends DrupalWebTestCase {
// Get all RDF namespaces.
$ns = rdf_get_namespaces();
- $this->assertEqual($ns['owl'], 'http://www.w3.org/2002/07/owl#', 'A prefix declared once is included.');
- $this->assertEqual($ns['foaf'], 'http://xmlns.com/foaf/0.1/', 'The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.');
- $this->assertEqual($ns['foaf1'], 'http://xmlns.com/foaf/0.1/', 'Two prefixes can be assigned the same namespace.');
- $this->assertTrue(!isset($ns['dc']), 'A prefix with conflicting namespaces is discarded.');
+ $this->assertEqual($ns['owl'], 'http://www.w3.org/2002/07/owl#', t('A prefix declared once is included.'));
+ $this->assertEqual($ns['foaf'], 'http://xmlns.com/foaf/0.1/', t('The same prefix declared in several implementations of hook_rdf_namespaces() is valid as long as all the namespaces are the same.'));
+ $this->assertEqual($ns['foaf1'], 'http://xmlns.com/foaf/0.1/', t('Two prefixes can be assigned the same namespace.'));
+ $this->assertTrue(!isset($ns['dc']), t('A prefix with conflicting namespaces is discarded.'));
}
}