This commit refactors the method processTaskStrategy() of some SimpleWorker child classes to use Doctrine instead of Paris. In this commit are included all the classes that it was only necessary to change the method signature as they were receiving a ScheduledTask object as the first parameter but didn't use it. Now they receive a ScheduledTaskEntity object as the first param. [MAILPOET-3843]
22 lines
716 B
PHP
22 lines
716 B
PHP
<?php
|
|
|
|
namespace MailPoet\Test\Cron\Workers;
|
|
|
|
use Codeception\Stub;
|
|
use MailPoet\Cron\Workers\AuthorizedSendingEmailsCheck;
|
|
use MailPoet\Entities\ScheduledTaskEntity;
|
|
use MailPoet\Services\AuthorizedEmailsController;
|
|
|
|
class AuthorizedSendingEmailsCheckTest extends \MailPoetTest {
|
|
public function _before() {
|
|
parent::_before();
|
|
$this->truncateEntity(ScheduledTaskEntity::class);
|
|
}
|
|
|
|
public function testItRunsCheckOnBridge() {
|
|
$bridgeMock = $this->makeEmpty(AuthorizedEmailsController::class, ['checkAuthorizedEmailAddresses' => Stub\Expected::once()]);
|
|
$worker = new AuthorizedSendingEmailsCheck($bridgeMock);
|
|
$worker->processTaskStrategy(new ScheduledTaskEntity(), microtime(true));
|
|
}
|
|
}
|