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

@ -136,7 +136,7 @@ class MigrationTest extends \MailPoetTest {
$task = ScheduledTask::create();
$task->type = Migration::TASK_TYPE;
$task->status = ScheduledTask::STATUS_SCHEDULED;
$task->scheduled_at = Carbon::createFromTimestamp(current_time('timestamp'));
$task->scheduled_at = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
$task->save();
return $task;
}
@ -145,7 +145,7 @@ class MigrationTest extends \MailPoetTest {
$task = ScheduledTask::create();
$task->type = Migration::TASK_TYPE;
$task->status = null;
$task->scheduled_at = Carbon::createFromTimestamp(current_time('timestamp'));
$task->scheduled_at = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
$task->save();
return $task;
}
@ -154,7 +154,7 @@ class MigrationTest extends \MailPoetTest {
$task = ScheduledTask::create();
$task->type = Migration::TASK_TYPE;
$task->status = ScheduledTask::STATUS_COMPLETED;
$task->scheduled_at = Carbon::createFromTimestamp(current_time('timestamp'));
$task->scheduled_at = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
$task->save();
return $task;
}