Sync subscribers sequentially from orders

[MAILPOET-3954]
This commit is contained in:
Jan Lysý
2021-11-24 15:34:34 +01:00
committed by Veljko V
parent 00f4913739
commit 9bd6cb159c
4 changed files with 83 additions and 71 deletions

View File

@@ -9,19 +9,22 @@ use MailPoet\Test\DataFactories\ScheduledTask as ScheduledTaskFactory;
use MailPoet\WooCommerce\Helper as WooCommerceHelper;
use MailPoet\WP\Functions as WPFunctions;
use MailPoetVendor\Carbon\Carbon;
use MailPoetVendor\Doctrine\DBAL\Connection;
class WooCommerceSyncTest extends \MailPoetTest {
public $worker;
public $woocommerceHelper;
public $woocommerceSegment;
public $connection;
/** @var ScheduledTaskFactory */
private $scheduledTaskFactory;
public function _before() {
$this->woocommerceSegment = $this->createMock(WooCommerceSegment::class);
$this->woocommerceHelper = $this->createMock(WooCommerceHelper::class);
$this->connection = $this->createMock(Connection::class);
$this->scheduledTaskFactory = new ScheduledTaskFactory();
$this->worker = new WooCommerceSync($this->woocommerceSegment, $this->woocommerceHelper);
$this->worker = new WooCommerceSync($this->woocommerceSegment, $this->woocommerceHelper, $this->connection);
}
public function testItWillNotRunIfWooCommerceIsDisabled() {