From 3dddaa3e6ff47b52df5836a49272952893208ddc Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Sun, 18 Oct 2009 06:56:24 +0000 Subject: #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. --- modules/trigger/trigger.test | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'modules/trigger') 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. -- cgit v1.2.3