diff options
Diffstat (limited to 'modules/trigger/tests/trigger_test.module')
-rw-r--r-- | modules/trigger/tests/trigger_test.module | 32 |
1 files changed, 32 insertions, 0 deletions
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); +} |