diff --git a/scheduler.test.15 b/scheduler.test index 802d614..7cea844 100644 --- a/scheduler.test.15 +++ b/scheduler.test @@ -91,7 +91,7 @@ class SchedulerTestCase extends DrupalWebTestCase { */ public function testSchedulerPastDates() { // Log in. - $this->drupalLogin($this->web_user); + $this->drupalLogin($this->admin_user); // Create an unpublished page node. $node = $this->drupalCreateNode(array('type' => 'page', 'status' => FALSE)); @@ -103,13 +103,13 @@ class SchedulerTestCase extends DrupalWebTestCase { 'publish_on' => format_date(strtotime('-1 day'), 'custom', 'Y-m-d H:i:s'), ); $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); - $this->assertRaw(t("The 'publish on' date must be in the future"), 'An error message is shown when the publication date is in the past and the "error" behavior is chosen.'); + $this->assertRaw(format_string("The 'publish on' date must be in the future"), 'An error message is shown when the publication date is in the past and the "error" behavior is chosen.'); // Test the 'publish' behavior: the node should be published immediately. variable_set('scheduler_publish_past_date_page', 'publish'); $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); - $this->assertNoRaw(t("The 'publish on' date must be in the future"), 'No error message is shown when the publication date is in the past and the "publish" behavior is chosen.'); - $this->assertRaw(t('@type %title has been updated.', array('@type' => t('Basic page'), '%title' => check_plain($edit['title']))), 'The node is saved successfully when the publication date is in the past and the "publish" behavior is chosen.'); + $this->assertNoRaw(format_string("The 'publish on' date must be in the future"), 'No error message is shown when the publication date is in the past and the "publish" behavior is chosen.'); + $this->assertRaw(format_string('@type %title has been updated.', array('@type' => 'Basic page', '%title' => check_plain($edit['title']))), 'The node is saved successfully when the publication date is in the past and the "publish" behavior is chosen.'); // Reload the changed node and check that it is published. $node = node_load($node->nid, NULL, TRUE); @@ -121,8 +121,8 @@ class SchedulerTestCase extends DrupalWebTestCase { variable_set('scheduler_publish_past_date_page', 'schedule'); $this->drupalPost('node/' . $node->nid . '/edit', $edit, t('Save')); $this->assertNoRaw(format_string("The 'publish on' date must be in the future"), 'No error message is shown when the publication date is in the past and the "schedule" behavior is chosen.'); - $this->assertRaw(t('@type %title has been updated.', array('@type' => t('Basic page'), '%title' => check_plain($edit['title']))), 'The node is saved successfully when the publication date is in the past and the "schedule" behavior is chosen.'); - $this->assertRaw(t('This post is unpublished and will be published @publish_time.', array('@publish_time' => $edit['publish_on'])), 'The node is scheduled to be published when the publication date is in the past and the "schedule" behavior is chosen.'); + $this->assertRaw(format_string('@type %title has been updated.', array('@type' => 'Basic page', '%title' => check_plain($edit['title']))), 'The node is saved successfully when the publication date is in the past and the "schedule" behavior is chosen.'); + $this->assertRaw(format_string('This post is unpublished and will be published @publish_time.', array('@publish_time' => $edit['publish_on'])), 'The node is scheduled to be published when the publication date is in the past and the "schedule" behavior is chosen.'); // Reload the node and check that it is unpublished but scheduled correctly. $node = node_load($node->nid, NULL, TRUE);