$queue_worker_manager =
$this->
prophesize('Drupal\Core\Queue\QueueWorkerManagerInterface'
);
$state =
$this->
prophesize('Drupal\Core\State\StateInterface'
);
$account_switcher =
$this->
prophesize('Drupal\Core\Session\AccountSwitcherInterface'
);
$queueConfig =
[ 'suspendMaximumWait' => 30.0,
];
// Create a lock that will always fail when attempting to acquire; we're
// only interested in testing ::processQueues(), not the other stuff.
$lock_backend =
$this->
prophesize('Drupal\Core\Lock\LockBackendInterface'
);
$lock_backend->
acquire('cron', Argument::
cetera())->
willReturn(TRUE
);
$lock_backend->
release('cron'
)->
shouldBeCalled();
// Create a queue worker definition for testing purposes.
$queue_worker =
$this->
randomMachineName();
$queue_worker_definition =
[ 'id' =>
$queue_worker,
'cron' =>
[ 'time' => &
$this->claimTime,
],
];
// Create a queue instance for this queue worker.