summaryrefslogtreecommitdiff
path: root/modules/trigger
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-18 06:56:24 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2009-10-18 06:56:24 +0000
commit3dddaa3e6ff47b52df5836a49272952893208ddc (patch)
tree2f3f069774f2f2091a0a169c6210fc356e2d057a /modules/trigger
parent1650fea5d949b576bcc779d6315250da0ba7ec82 (diff)
downloadbrdo-3dddaa3e6ff47b52df5836a49272952893208ddc.tar.gz
brdo-3dddaa3e6ff47b52df5836a49272952893208ddc.tar.bz2
#356074 by chx and Damien Tournoud: Provide a sequences API. Gets rid of stupid tables that only contain an incrementing ID, and fixes database import problems due to user ID 0.
Diffstat (limited to 'modules/trigger')
-rw-r--r--modules/trigger/trigger.test7
1 files changed, 5 insertions, 2 deletions
diff --git a/modules/trigger/trigger.test b/modules/trigger/trigger.test
index 7204dc395..d7732fe02 100644
--- a/modules/trigger/trigger.test
+++ b/modules/trigger/trigger.test
@@ -151,7 +151,10 @@ class TriggerCronTestCase extends DrupalWebTestCase {
'subject' => $action_label,
);
$this->drupalPost('admin/config/system/actions/configure/' . $hash, $edit, t('Save'));
- $edit = array('aid' => md5('1'));
+ $aid = db_query('SELECT aid FROM {actions} WHERE callback = :callback', array(':callback' => 'trigger_test_system_cron_conf_action'))->fetchField();
+ // $aid is likely 3 but if we add more uses for the sequences table in
+ // core it might break, so it is easier to get the value from the database.
+ $edit = array('aid' => md5($aid));
$this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'));
// Add a second configurable action to the cron trigger.
@@ -161,7 +164,7 @@ class TriggerCronTestCase extends DrupalWebTestCase {
'subject' => $action_label,
);
$this->drupalPost('admin/config/system/actions/configure/' . $hash, $edit, t('Save'));
- $edit = array('aid' => md5('2'));
+ $edit = array('aid' => md5($aid + 1));
$this->drupalPost('admin/structure/trigger/system', $edit, t('Assign'));
// Force a cron run.