drupal core updated to 7.28
This commit is contained in:
@@ -4,8 +4,8 @@ package = Testing
|
||||
core = 7.x
|
||||
hidden = TRUE
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -6,8 +6,8 @@ core = 7.x
|
||||
files[] = trigger.test
|
||||
configure = admin/structure/trigger
|
||||
|
||||
; Information added by drupal.org packaging script on 2013-08-08
|
||||
version = "7.23"
|
||||
; Information added by Drupal.org packaging script on 2014-05-08
|
||||
version = "7.28"
|
||||
project = "drupal"
|
||||
datestamp = "1375928238"
|
||||
datestamp = "1399522731"
|
||||
|
||||
|
@@ -82,10 +82,10 @@ class TriggerContentTestCase extends TriggerWebTestCase {
|
||||
$edit[$info['property']] = !$info['expected'];
|
||||
$this->drupalPost('node/add/page', $edit, t('Save'));
|
||||
// Make sure the text we want appears.
|
||||
$this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit["title"])), t('Make sure the Basic page has actually been created'));
|
||||
$this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit["title"])), 'Make sure the Basic page has actually been created');
|
||||
// Action should have been fired.
|
||||
$loaded_node = $this->drupalGetNodeByTitle($edit["title"]);
|
||||
$this->assertTrue($loaded_node->$info['property'] == $info['expected'], t('Make sure the @action action fired.', array('@action' => $info['name'])));
|
||||
$this->assertTrue($loaded_node->$info['property'] == $info['expected'], format_string('Make sure the @action action fired.', array('@action' => $info['name'])));
|
||||
// Leave action assigned for next test
|
||||
|
||||
// There should be an error when the action is assigned to the trigger
|
||||
@@ -94,13 +94,13 @@ class TriggerContentTestCase extends TriggerWebTestCase {
|
||||
// This action already assigned in this test.
|
||||
$edit = array('aid' => $hash);
|
||||
$this->drupalPost('admin/structure/trigger/node', $edit, t('Assign'), array(), array(), 'trigger-node-presave-assign-form');
|
||||
$this->assertRaw(t('The action you chose is already assigned to that trigger.'), t('Check to make sure an error occurs when assigning an action to a trigger twice.'));
|
||||
$this->assertRaw(t('The action you chose is already assigned to that trigger.'), 'Check to make sure an error occurs when assigning an action to a trigger twice.');
|
||||
|
||||
// The action should be able to be unassigned from a trigger.
|
||||
$this->drupalPost('admin/structure/trigger/unassign/node/node_presave/' . $hash, array(), t('Unassign'));
|
||||
$this->assertRaw(t('Action %action has been unassigned.', array('%action' => ucfirst($info['name']))), t('Check to make sure the @action action can be unassigned from the trigger.', array('@action' => $info['name'])));
|
||||
$this->assertRaw(t('Action %action has been unassigned.', array('%action' => ucfirst($info['name']))), format_string('Check to make sure the @action action can be unassigned from the trigger.', array('@action' => $info['name'])));
|
||||
$assigned = db_query("SELECT COUNT(*) FROM {trigger_assignments} WHERE aid IN (:keys)", array(':keys' => $content_actions))->fetchField();
|
||||
$this->assertFalse($assigned, t('Check to make sure unassign worked properly at the database level.'));
|
||||
$this->assertFalse($assigned, 'Check to make sure unassign worked properly at the database level.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,7 +132,7 @@ class TriggerContentTestCase extends TriggerWebTestCase {
|
||||
);
|
||||
$this->drupalPost('admin/content', $edit, t('Update'));
|
||||
$count = variable_get('trigger_test_generic_any_action', 0);
|
||||
$this->assertTrue($count == 2, t('Action was triggered 2 times. Actual: %count', array('%count' => $count)));
|
||||
$this->assertTrue($count == 2, format_string('Action was triggered 2 times. Actual: %count', array('%count' => $count)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -242,11 +242,11 @@ class TriggerCronTestCase extends TriggerWebTestCase {
|
||||
|
||||
// Make sure the non-configurable action has fired.
|
||||
$action_run = variable_get('trigger_test_system_cron_action', FALSE);
|
||||
$this->assertTrue($action_run, t('Check that the cron run triggered the test action.'));
|
||||
$this->assertTrue($action_run, 'Check that the cron run triggered the test action.');
|
||||
|
||||
// Make sure that both configurable actions have fired.
|
||||
$action_run = variable_get('trigger_test_system_cron_conf_action', 0) == 2;
|
||||
$this->assertTrue($action_run, t('Check that the cron run triggered both complex actions.'));
|
||||
$this->assertTrue($action_run, 'Check that the cron run triggered both complex actions.');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -321,7 +321,7 @@ class TriggerActionTestCase extends TriggerWebTestCase {
|
||||
$trigger_type = preg_replace('/_.*/', '', $trigger);
|
||||
$this->drupalPost("admin/structure/trigger/$trigger_type", $edit, t('Assign'), array(), array(), $form_html_id);
|
||||
$actions = trigger_get_assigned_actions($trigger);
|
||||
$this->assertTrue(!empty($actions[$action]), t('Simple action @action assigned to trigger @trigger', array('@action' => $action, '@trigger' => $trigger)));
|
||||
$this->assertTrue(!empty($actions[$action]), format_string('Simple action @action assigned to trigger @trigger', array('@action' => $action, '@trigger' => $trigger)));
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -402,7 +402,7 @@ class TriggerActionTestCase extends TriggerWebTestCase {
|
||||
function assertSystemMessageTokenReplacement($trigger, $account) {
|
||||
$expected = $this->generateTokenExpandedComparison($trigger, $account);
|
||||
$this->assertText($expected,
|
||||
t('Expected system message to contain token-replaced text "@expected" found in configured system message action', array('@expected' => $expected )) );
|
||||
format_string('Expected system message to contain token-replaced text "@expected" found in configured system message action', array('@expected' => $expected )) );
|
||||
}
|
||||
|
||||
|
||||
@@ -421,7 +421,7 @@ class TriggerActionTestCase extends TriggerWebTestCase {
|
||||
$expected = $this->generateTokenExpandedComparison($trigger, $account);
|
||||
$this->assertMailString('subject', $expected, $email_depth);
|
||||
$this->assertMailString('body', $expected, $email_depth);
|
||||
$this->assertMail('to', $account->mail, t('Mail sent to correct destination'));
|
||||
$this->assertMail('to', $account->mail, 'Mail sent to correct destination');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -517,7 +517,7 @@ class TriggerUserActionTestCase extends TriggerActionTestCase {
|
||||
$this->drupalPost("node/{$node->nid}", array('comment_body[und][0][value]' => t("my comment"), 'subject' => t("my comment subject")), t('Save'));
|
||||
// Posting a comment should have blocked this user.
|
||||
$account = user_load($test_user->uid, TRUE);
|
||||
$this->assertTrue($account->status == 0, t('Account is blocked'));
|
||||
$this->assertTrue($account->status == 0, 'Account is blocked');
|
||||
$comment_author_uid = $account->uid;
|
||||
// Now rehabilitate the comment author so it can be be blocked again when
|
||||
// the comment is updated.
|
||||
@@ -529,7 +529,7 @@ class TriggerUserActionTestCase extends TriggerActionTestCase {
|
||||
// Our original comment will have been comment 1.
|
||||
$this->drupalPost("comment/1/edit", array('comment_body[und][0][value]' => t("my comment, updated"), 'subject' => t("my comment subject")), t('Save'));
|
||||
$comment_author_account = user_load($comment_author_uid, TRUE);
|
||||
$this->assertTrue($comment_author_account->status == 0, t('Comment author account (uid=@uid) is blocked after update to comment', array('@uid' => $comment_author_uid)));
|
||||
$this->assertTrue($comment_author_account->status == 0, format_string('Comment author account (uid=@uid) is blocked after update to comment', array('@uid' => $comment_author_uid)));
|
||||
|
||||
// Verify that the comment was updated.
|
||||
$test_user = $this->drupalCreateUser(array('administer actions', 'create article content', 'access comments', 'administer comments', 'skip comment approval', 'edit own comments'));
|
||||
@@ -589,7 +589,7 @@ class TriggerOtherTestCase extends TriggerWebTestCase {
|
||||
$this->drupalPost('admin/people/create', $edit, t('Create new account'));
|
||||
|
||||
// Verify that the action variable has been set.
|
||||
$this->assertTrue(variable_get($action_id, FALSE), t('Check that creating a user triggered the test action.'));
|
||||
$this->assertTrue(variable_get($action_id, FALSE), 'Check that creating a user triggered the test action.');
|
||||
|
||||
// Reset the action variable.
|
||||
variable_set($action_id, FALSE);
|
||||
@@ -608,8 +608,8 @@ class TriggerOtherTestCase extends TriggerWebTestCase {
|
||||
|
||||
// Verify that the action has been assigned to the correct hook.
|
||||
$actions = trigger_get_assigned_actions('user_login');
|
||||
$this->assertEqual(1, count($actions), t('One Action assigned to the hook'));
|
||||
$this->assertEqual($actions[$aid]['label'], $action_edit['actions_label'], t('Correct action label found.'));
|
||||
$this->assertEqual(1, count($actions), 'One Action assigned to the hook');
|
||||
$this->assertEqual($actions[$aid]['label'], $action_edit['actions_label'], 'Correct action label found.');
|
||||
|
||||
// User should get the configured message at login.
|
||||
$contact_user = $this->drupalCreateUser(array('access site-wide contact form'));;
|
||||
@@ -643,7 +643,7 @@ class TriggerOtherTestCase extends TriggerWebTestCase {
|
||||
$this->drupalPost(NULL, $edit, t('Save'));
|
||||
|
||||
// Verify that the action variable has been set.
|
||||
$this->assertTrue(variable_get($action_id, FALSE), t('Check that creating a comment triggered the action.'));
|
||||
$this->assertTrue(variable_get($action_id, FALSE), 'Check that creating a comment triggered the action.');
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -679,7 +679,7 @@ class TriggerOtherTestCase extends TriggerWebTestCase {
|
||||
taxonomy_term_save($term);
|
||||
|
||||
// Verify that the action variable has been set.
|
||||
$this->assertTrue(variable_get($action_id, FALSE), t('Check that creating a taxonomy term triggered the action.'));
|
||||
$this->assertTrue(variable_get($action_id, FALSE), 'Check that creating a taxonomy term triggered the action.');
|
||||
}
|
||||
|
||||
}
|
||||
@@ -723,10 +723,10 @@ class TriggerOrphanedActionsTestCase extends DrupalWebTestCase {
|
||||
$edit["title"] = '!SimpleTest test node! ' . $this->randomName(10);
|
||||
$edit["body[$langcode][0][value]"] = '!SimpleTest test body! ' . $this->randomName(32) . ' ' . $this->randomName(32);
|
||||
$this->drupalPost('node/add/page', $edit, t('Save'));
|
||||
$this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit["title"])), t('Make sure the Basic page has actually been created'));
|
||||
$this->assertRaw(t('!post %title has been created.', array('!post' => 'Basic page', '%title' => $edit["title"])), 'Make sure the Basic page has actually been created');
|
||||
|
||||
// Action should have been fired.
|
||||
$this->assertTrue(variable_get('trigger_test_generic_any_action', FALSE), t('Trigger test action successfully fired.'));
|
||||
$this->assertTrue(variable_get('trigger_test_generic_any_action', FALSE), 'Trigger test action successfully fired.');
|
||||
|
||||
// Disable the module that provides the action and make sure the trigger
|
||||
// doesn't white screen.
|
||||
@@ -737,7 +737,7 @@ class TriggerOrphanedActionsTestCase extends DrupalWebTestCase {
|
||||
|
||||
// If the node body was updated successfully we have dealt with the
|
||||
// unavailable action.
|
||||
$this->assertRaw(t('!post %title has been updated.', array('!post' => 'Basic page', '%title' => $edit["title"])), t('Make sure the Basic page can be updated with the missing trigger function.'));
|
||||
$this->assertRaw(t('!post %title has been updated.', array('!post' => 'Basic page', '%title' => $edit["title"])), 'Make sure the Basic page can be updated with the missing trigger function.');
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user