Remove reading batch size from constructor
[MAILPOET-3588]
This commit is contained in:
@@ -155,11 +155,14 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
}
|
||||
|
||||
public function testItConstructs() {
|
||||
expect($this->sendingQueueWorker->batchSize)->equals(SendingThrottlingHandler::BATCH_SIZE);
|
||||
expect($this->sendingQueueWorker->mailerTask instanceof MailerTask);
|
||||
expect($this->sendingQueueWorker->newsletterTask instanceof NewsletterTask);
|
||||
}
|
||||
|
||||
public function testItReturnsCorrectBatchSize(): void {
|
||||
expect($this->sendingQueueWorker->getBatchSize())->equals(SendingThrottlingHandler::BATCH_SIZE);
|
||||
}
|
||||
|
||||
public function testItEnforcesExecutionLimitsBeforeQueueProcessing() {
|
||||
$sendingQueueWorker = Stub::make($this->getSendingQueueWorker(
|
||||
Stub::makeEmpty(NewslettersRepository::class)),
|
||||
@@ -861,7 +864,7 @@ class SendingQueueTest extends \MailPoetTest {
|
||||
$wp = new WPFunctions;
|
||||
$wp->addFilter('mailpoet_cron_worker_sending_queue_batch_size', $filter);
|
||||
$sendingQueueWorker = $this->getSendingQueueWorker(Stub::makeEmpty(NewslettersRepository::class));
|
||||
expect($sendingQueueWorker->batchSize)->equals($customBatchSizeValue);
|
||||
expect($sendingQueueWorker->getBatchSize())->equals($customBatchSizeValue);
|
||||
$wp->removeFilter('mailpoet_cron_worker_sending_queue_batch_size', $filter);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user