Projet

Général

Profil

Paste
Télécharger (548 octets) Statistiques
| Branche: | Révision:

root / drupal7 / modules / system / tests / cron_queue_test.module @ c7768a53

1
<?php
2

    
3
/**
4
 * Implements hook_cron_queue_info().
5
 */
6
function cron_queue_test_cron_queue_info() {
7
  $queues['cron_queue_test_exception'] = array(
8
    'worker callback' => 'cron_queue_test_exception',
9
  );
10
  $queues['cron_queue_test_callback'] = array(
11
    'worker callback' => array('CronQueueTestCallbackClass', 'foo'),
12
  );
13

    
14
  return $queues;
15
}
16

    
17
function cron_queue_test_exception($item) {
18
  throw new Exception('That is not supposed to happen.');
19
}
20

    
21
class CronQueueTestCallbackClass {
22

    
23
  static public function foo() {
24
    // Do nothing.
25
  }
26

    
27
}