class RulesTestTaskHandler
Test task handler class.
Hierarchy
- class \RulesSchedulerDefaultTaskHandler implements \RulesSchedulerTaskHandlerInterface
- class \RulesTestTaskHandler extends \RulesSchedulerDefaultTaskHandler
Expanded class hierarchy of RulesTestTaskHandler
1 string reference to 'RulesTestTaskHandler'
- RulesSchedulerTestCase::testCustomTaskHandler in rules_scheduler/
tests/ rules_scheduler.test - Tests that custom task handlers are properly invoked.
File
-
rules_scheduler/
tests/ rules_scheduler_test.inc, line 11
View source
class RulesTestTaskHandler extends RulesSchedulerDefaultTaskHandler {
/**
* Overrides RulesSchedulerDefaultTaskHandler::runTask().
*/
public function runTask() {
$task = $this->getTask();
$data = unserialize($task['data']);
// Set the variable defined in the test to TRUE.
variable_set($data['variable'], TRUE);
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
RulesSchedulerDefaultTaskHandler::$task | protected | property | The task array. | |
RulesSchedulerDefaultTaskHandler::afterTaskQueued | public | function | Implements RulesSchedulerTaskHandlerInterface::afterTaskQueued(). | Overrides RulesSchedulerTaskHandlerInterface::afterTaskQueued |
RulesSchedulerDefaultTaskHandler::getTask | public | function | Implements RulesSchedulerTaskHandlerInterface::getTask(). | Overrides RulesSchedulerTaskHandlerInterface::getTask |
RulesSchedulerDefaultTaskHandler::__construct | public | function | Constructs a repetitive task handler object. | |
RulesTestTaskHandler::runTask | public | function | Overrides RulesSchedulerDefaultTaskHandler::runTask(). | Overrides RulesSchedulerDefaultTaskHandler::runTask |