Commit 162314d7 authored by jhodgdon's avatar jhodgdon
Browse files

Issue #1798954 by Lars Toomre: Remove t() from test asserts in Action module

parent 59a51ae1
......@@ -51,8 +51,8 @@ function testActionConfiguration() {
$this->drupalPost('admin/config/system/actions/configure/' . drupal_hash_base64('action_goto_action'), $edit, t('Save'));
// Make sure that the new complex action was saved properly.
$this->assertText(t('The action has been successfully saved.'), t("Make sure we get a confirmation that we've successfully saved the complex action."));
$this->assertText($action_label, t("Make sure the action label appears on the configuration page after we've saved the complex action."));
$this->assertText(t('The action has been successfully saved.'), "Make sure we get a confirmation that we've successfully saved the complex action.");
$this->assertText($action_label, "Make sure the action label appears on the configuration page after we've saved the complex action.");
// Make another POST request to the action edit page.
$this->clickLink(t('configure'));
......@@ -65,9 +65,9 @@ function testActionConfiguration() {
$this->drupalPost(NULL, $edit, t('Save'));
// Make sure that the action updated properly.
$this->assertText(t('The action has been successfully saved.'), t("Make sure we get a confirmation that we've successfully updated the complex action."));
$this->assertNoText($action_label, t("Make sure the old action label does NOT appear on the configuration page after we've updated the complex action."));
$this->assertText($new_action_label, t("Make sure the action label appears on the configuration page after we've updated the complex action."));
$this->assertText(t('The action has been successfully saved.'), "Make sure we get a confirmation that we've successfully updated the complex action.");
$this->assertNoText($action_label, "Make sure the old action label does NOT appear on the configuration page after we've updated the complex action.");
$this->assertText($new_action_label, "Make sure the action label appears on the configuration page after we've updated the complex action.");
// Make sure that deletions work properly.
$this->clickLink(t('delete'));
......@@ -75,10 +75,10 @@ function testActionConfiguration() {
$this->drupalPost("admin/config/system/actions/delete/$aid", $edit, t('Delete'));
// Make sure that the action was actually deleted.
$this->assertRaw(t('Action %action was deleted', array('%action' => $new_action_label)), t('Make sure that we get a delete confirmation message.'));
$this->assertRaw(t('Action %action was deleted', array('%action' => $new_action_label)), 'Make sure that we get a delete confirmation message.');
$this->drupalGet('admin/config/system/actions/manage');
$this->assertNoText($new_action_label, t("Make sure the action label does not appear on the overview page after we've deleted the action."));
$this->assertNoText($new_action_label, "Make sure the action label does not appear on the overview page after we've deleted the action.");
$exists = db_query('SELECT aid FROM {actions} WHERE callback = :callback', array(':callback' => 'drupal_goto_action'))->fetchField();
$this->assertFalse($exists, t('Make sure the action is gone from the database after being deleted.'));
$this->assertFalse($exists, 'Make sure the action is gone from the database after being deleted.');
}
}
......@@ -70,8 +70,8 @@ protected function triggerActions() {
$loop_started = FALSE;
foreach ($result as $row) {
$expected_message = array_shift($expected);
$this->assertEqual($row->message, $expected_message, t('Expected message %expected, got %message.', array('%expected' => $expected_message, '%message' => $row->message)));
$this->assertEqual($row->message, $expected_message, format_string('Expected message %expected, got %message.', array('%expected' => $expected_message, '%message' => $row->message)));
}
$this->assertTrue(empty($expected), t('All expected messages found.'));
$this->assertTrue(empty($expected), 'All expected messages found.');
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment