33 lines
721 B
Plaintext
33 lines
721 B
Plaintext
<?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);
|
|
}
|