diff --git a/tests/integration/Cron/Workers/SendingQueue/MigrationTest.php b/tests/integration/Cron/Workers/SendingQueue/MigrationTest.php index 997dcf9a04..922a9eea0a 100644 --- a/tests/integration/Cron/Workers/SendingQueue/MigrationTest.php +++ b/tests/integration/Cron/Workers/SendingQueue/MigrationTest.php @@ -57,8 +57,8 @@ class MigrationTest extends \MailPoetTest { function testItPausesSendingWhenPreparingATask() { $task = $this->createScheduledTask(); expect(MailerLog::isSendingPaused())->false(); - $this->worker->prepareTask($task, microtime(true)); - expect($task->status)->null(); + $result = $this->worker->prepareTaskStrategy($task, microtime(true)); + expect($result)->true(); expect(MailerLog::isSendingPaused())->true(); } @@ -67,14 +67,14 @@ class MigrationTest extends \MailPoetTest { $this->worker->pauseSending(); expect(MailerLog::isSendingPaused())->true(); $task = $this->createScheduledTask(); - $this->worker->prepareTask($task, microtime(true)); + $this->worker->prepareTaskStrategy($task, microtime(true)); expect(MailerLog::isSendingPaused())->false(); } function testItCompletesTaskIfThereIsNothingToMigrate() { SendingQueue::deleteMany(); $task = $this->createScheduledTask(); - $this->worker->prepareTask($task, microtime(true)); + $this->worker->prepareTaskStrategy($task, microtime(true)); expect(ScheduledTask::findOne($task->id)->status)->equals(ScheduledTask::STATUS_COMPLETED); } @@ -84,7 +84,7 @@ class MigrationTest extends \MailPoetTest { expect(ScheduledTaskSubscriber::whereGt('task_id', 0)->count())->equals(0); $task = $this->createRunningTask(); - $this->worker->processTask($task, microtime(true)); + $this->worker->processTaskStrategy($task, microtime(true)); expect($this->worker->getUnmigratedQueues()->count())->equals(0); expect(ScheduledTask::where('type', SendingTask::TASK_TYPE)->findMany())->count(4); @@ -106,7 +106,7 @@ class MigrationTest extends \MailPoetTest { $this->worker->pauseSending(); expect(MailerLog::isSendingPaused())->true(); $task = $this->createRunningTask(); - $this->worker->processTask($task, microtime(true)); + $this->worker->processTaskStrategy($task, microtime(true)); expect(MailerLog::isSendingPaused())->false(); }