public function QueueWorkerLockedTest::testDownloadLockedQueueAcquireLockAndProcess in TMGMT Extension Suite 8.3
Download queue worker: lock acquired and queue item is processed.
File
- tests/
src/ Kernel/ QueueWorkerLockedTest.php, line 183
Class
- QueueWorkerLockedTest
- Tests locked queues.
Namespace
Drupal\Tests\tmgmt_extension_suit\KernelCode
public function testDownloadLockedQueueAcquireLockAndProcess() {
$lockId = get_class($this->downloadQueueWorker) . ':processItem';
$this->downloadQueueWorker
->expects($this
->once())
->method('doProcessItem')
->with([
"foo" => "bar",
]);
$this->lockMock
->expects($this
->once())
->method('acquire')
->with($lockId, 29)
->willReturn(TRUE);
$this->lockMock
->expects($this
->once())
->method('release');
$this->downloadQueueWorker
->processItem([
"foo" => "bar",
]);
}