Issue #2011822 by pdrake: Fixed Trigger content (node) actions test assumes auto-increment increment of 1.

merge-requests/26/head
David Rothstein 2013-08-05 02:34:14 -04:00
parent 410bc91123
commit 2f322e9ba8
1 changed files with 4 additions and 4 deletions

View File

@ -114,10 +114,10 @@ class TriggerContentTestCase extends TriggerWebTestCase {
// Assign an action to the node save/update trigger. // Assign an action to the node save/update trigger.
$test_user = $this->drupalCreateUser(array('administer actions', 'administer nodes', 'create page content', 'access administration pages', 'access content overview')); $test_user = $this->drupalCreateUser(array('administer actions', 'administer nodes', 'create page content', 'access administration pages', 'access content overview'));
$this->drupalLogin($test_user); $this->drupalLogin($test_user);
$nodes = array();
for ($index = 0; $index < 3; $index++) { for ($index = 0; $index < 3; $index++) {
$edit = array('title' => $this->randomName()); $nodes[] = $this->drupalCreateNode(array('type' => 'page'));
$this->drupalPost('node/add/page', $edit, t('Save'));
} }
$action_id = 'trigger_test_generic_any_action'; $action_id = 'trigger_test_generic_any_action';
@ -127,8 +127,8 @@ class TriggerContentTestCase extends TriggerWebTestCase {
$edit = array( $edit = array(
'operation' => 'unpublish', 'operation' => 'unpublish',
'nodes[1]' => TRUE, 'nodes[' . $nodes[0]->nid . ']' => TRUE,
'nodes[2]' => TRUE, 'nodes[' . $nodes[1]->nid . ']' => TRUE,
); );
$this->drupalPost('admin/content', $edit, t('Update')); $this->drupalPost('admin/content', $edit, t('Update'));
$count = variable_get('trigger_test_generic_any_action', 0); $count = variable_get('trigger_test_generic_any_action', 0);