$status=(bool)db_query_range("SELECT 1 FROM {watchdog} WHERE message = :message AND variables = :variables",0,1,array(':message'=>$watchdog_message,':variables'=>serialize($variables)))->fetchField();
@@ -42,7 +42,7 @@ function testApprovalAdminInterface() {
$subject=$this->randomName();
$body=$this->randomName();
$this->postComment($this->node,$body,$subject,TRUE);// Set $contact to true so that it won't check for id and message.
$this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'),t('Comment requires approval.'));
$this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'),'Comment requires approval.');
// Get unapproved comment id.
$this->drupalLogin($this->admin_user);
...
...
@@ -50,7 +50,7 @@ function testApprovalAdminInterface() {
$this->assertText(t('No comments available.'),t('All comments were deleted.'));
$this->assertText(t('No comments available.'),'All comments were deleted.');
}
/**
...
...
@@ -106,7 +106,7 @@ function testApprovalNodeInterface() {
$subject=$this->randomName();
$body=$this->randomName();
$this->postComment($this->node,$body,$subject,TRUE);// Set $contact to true so that it won't check for id and message.
$this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'),t('Comment requires approval.'));
$this->assertText(t('Your comment has been queued for review by site administrators and will be published after approval.'),'Comment requires approval.');
// Get unapproved comment id.
$this->drupalLogin($this->admin_user);
...
...
@@ -114,19 +114,19 @@ function testApprovalNodeInterface() {
// Test that a user with the 'access comments' permission can see the
// block.
$this->drupalLogin($this->web_user);
$this->drupalGet('');
$this->assertText($block['title'],t('Block was found.'));
$this->assertText($block['title'],'Block was found.');
// Test the only the 2 latest comments are shown and in the proper order.
$this->assertNoText($comment1->subject,t('Comment not found in block.'));
$this->assertText($comment2->subject,t('Comment found in block.'));
$this->assertText($comment3->comment,t('Comment found in block.'));
$this->assertTrue(strpos($this->drupalGetContent(),$comment3->comment)<strpos($this->drupalGetContent(),$comment2->subject),t('Comments were ordered correctly in block.'));
$this->assertNoText($comment1->subject,'Comment not found in block.');
$this->assertText($comment2->subject,'Comment found in block.');
$this->assertText($comment3->comment,'Comment found in block.');
$this->assertTrue(strpos($this->drupalGetContent(),$comment3->comment)<strpos($this->drupalGetContent(),$comment2->subject),'Comments were ordered correctly in block.');
// Set the number of recent comments to show to 10.
$this->drupalLogout();
...
...
@@ -75,29 +75,29 @@ function testRecentCommentBlock() {
$this->assertTrue(isset($instances['comment_node_'.$type_name]['comment_body']),t('The comment_body field is present for comments on type @type',array('@type'=>$type_name)));
$this->assertTrue(isset($instances['comment_node_'.$type_name]['comment_body']),format_string('The comment_body field is present for comments on type @type',array('@type'=>$type_name)));
@@ -38,7 +38,7 @@ function testCommentDefaultFields() {
// Check that the 'comment_body' field is deleted.
$field=field_info_field('comment_body');
$this->assertTrue(empty($field),t('The comment_body field was deleted'));
$this->assertTrue(empty($field),'The comment_body field was deleted');
// Create a new content type.
$type_name='test_node_type_2';
...
...
@@ -47,9 +47,9 @@ function testCommentDefaultFields() {
// Check that the 'comment_body' field exists and has an instance on the
// new comment bundle.
$field=field_info_field('comment_body');
$this->assertTrue($field,t('The comment_body field exists'));
$this->assertTrue($field,'The comment_body field exists');
$instances=field_info_instances('comment');
$this->assertTrue(isset($instances['comment_node_'.$type_name]['comment_body']),t('The comment_body field is present for comments on type @type',array('@type'=>$type_name)));
$this->assertTrue(isset($instances['comment_node_'.$type_name]['comment_body']),format_string('The comment_body field is present for comments on type @type',array('@type'=>$type_name)));
$this->assertTrue($comment_loaded->name==$this->web_user->name&&$comment_loaded->uid==$this->web_user->uid,t('Comment author successfully changed to a registered user.'));
$this->assertTrue($comment_loaded->name==$this->web_user->name&&$comment_loaded->uid==$this->web_user->uid,'Comment author successfully changed to a registered user.');
$this->drupalLogout();
...
...
@@ -87,38 +87,38 @@ function testCommentInterface() {