Use a wrapped function for current_time [MAILPOET-2488]

This commit is contained in:
wxa
2019-12-25 14:13:52 +03:00
committed by amine-mp
parent 176aba69fe
commit 6ed3915b1a
20 changed files with 83 additions and 68 deletions

View File

@@ -6,6 +6,7 @@ use MailPoet\API\JSON\v1\ImportExport;
use MailPoet\Cron\Workers\WooCommerceSync;
use MailPoet\DI\ContainerWrapper;
use MailPoet\Models\ScheduledTask;
use MailPoet\WP\Functions as WPFunctions;
use MailPoetVendor\Carbon\Carbon;
class ImportExportTest extends \MailPoetTest {
@@ -63,7 +64,7 @@ class ImportExportTest extends \MailPoetTest {
private function createTask($type, $status = null, $scheduled_at = null) {
if (!$scheduled_at) {
Carbon::createFromTimestamp(current_time('timestamp'));
Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
}
$task = ScheduledTask::create();
$task->type = $type;