public function QueueWorkerLockedTest::setUp in TMGMT Extension Suite 8.3
Tests set up.
Overrides KernelTestBase::setUp
File
- tests/
src/ Kernel/ QueueWorkerLockedTest.php, line 51
Class
- QueueWorkerLockedTest
- Tests locked queues.
Namespace
Drupal\Tests\tmgmt_extension_suit\KernelCode
public function setUp() {
parent::setUp();
$this->loggerMock = $this
->getMockBuilder(LoggerChannel::class)
->setMethods(NULL)
->disableOriginalConstructor()
->getMock();
$this->lockMock = $this
->getMockBuilder(PersistentDatabaseLockBackend::class)
->setMethods([
'acquire',
'release',
])
->disableOriginalConstructor()
->getMock();
$this->uploadQueueWorker = $this
->getMockBuilder(JobUpload::class)
->setMethods([
'doProcessItem',
])
->setConstructorArgs([
[],
"test_upload_queue_worker_id",
[
"cron" => [
"time" => 27,
],
],
$this->lockMock,
$this->loggerMock,
])
->getMock();
$this->downloadQueueWorker = $this
->getMockBuilder(JobDownload::class)
->setMethods([
'doProcessItem',
])
->setConstructorArgs([
[],
"test_download_queue_worker_id",
[
"cron" => [
"time" => 29,
],
],
$this->lockMock,
$this->loggerMock,
])
->getMock();
}