diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-05-27 16:29:05 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2009-05-27 16:29:05 +0000 |
commit | dd590b30800fdbb7652673cc9b48e005048df557 (patch) | |
tree | ca3c66780407133be4b5a686eaf122c94500f4e8 /modules/trigger/tests | |
parent | 9669352fda5d5eef6c8114d71a30afeb1f60976b (diff) | |
download | brdo-dd590b30800fdbb7652673cc9b48e005048df557.tar.gz brdo-dd590b30800fdbb7652673cc9b48e005048df557.tar.bz2 |
#246096 by andypost, mr.baileys, and Sutharsan: Fix typo so that cron triggers may be executed (with tests).
Diffstat (limited to 'modules/trigger/tests')
-rw-r--r-- | modules/trigger/tests/trigger_test.info | 7 | ||||
-rw-r--r-- | modules/trigger/tests/trigger_test.module | 32 |
2 files changed, 39 insertions, 0 deletions
diff --git a/modules/trigger/tests/trigger_test.info b/modules/trigger/tests/trigger_test.info new file mode 100644 index 000000000..878f9f98b --- /dev/null +++ b/modules/trigger/tests/trigger_test.info @@ -0,0 +1,7 @@ +; $Id$ +name = "Trigger Test" +description = "Support module for Trigger tests." +package = Testing +core = 7.x +files[] = trigger_test.module +hidden = TRUE diff --git a/modules/trigger/tests/trigger_test.module b/modules/trigger/tests/trigger_test.module new file mode 100644 index 000000000..c44360d52 --- /dev/null +++ b/modules/trigger/tests/trigger_test.module @@ -0,0 +1,32 @@ +<?php +// $Id$ + +/** + * @file + * Mock module to aid in testing trigger.module. + */ + +/** + * Implementation of hook_action_info(). + */ +function trigger_test_action_info() { + // Register an action that can be assigned to the trigger "cron run". + return array( + 'trigger_test_system_cron_action' => array( + 'type' => 'system', + 'description' => t('Cron test action'), + 'configurable' => FALSE, + 'hooks' => array( + 'cron' => array('run'), + ), + ), + ); +} + +/** + * Action fired during the "cron run" trigger test. + */ +function trigger_test_system_cron_action() { + // Indicate successful execution by setting a persistent variable. + variable_set('trigger_test_system_cron_action', TRUE); +} |