function AdvancedQueueCronTestCase::testCronWorker in Advanced Queue 7
Test cron calls workers.
File
- tests/
advancedqueue.test, line 57
Class
- AdvancedQueueCronTestCase
- Check cron functionality.
Code
function testCronWorker() {
$data = advancedqueue_test_populate_two_queues();
variable_set('advancedqueue_use_cron', TRUE);
$this
->cronRun();
$count = 0;
// Check to see that all items were sent to the worker.
foreach ($data as $item) {
$count += advancedqueue_test_count_watchdog('advancedqueue_test', 'advancedqueue_test_worker(@item)', array(
'@item' => print_r($item, TRUE),
), WATCHDOG_INFO);
}
$this
->assertEqual($count, 8, t('All queued items sent to worker.'));
}