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

@ -476,9 +476,9 @@ class SendingQueueTest extends \MailPoetTest {
}
public function testItUpdatesUpdateTime() {
$originalUpdated = Carbon::createFromTimestamp(current_time('timestamp'))->subHours(5)->toDateTimeString();
$originalUpdated = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'))->subHours(5)->toDateTimeString();
$this->queue->scheduled_at = Carbon::createFromTimestamp(current_time('timestamp'));
$this->queue->scheduled_at = Carbon::createFromTimestamp(WPFunctions::get()->currentTime('timestamp'));
$this->queue->updated_at = $originalUpdated;
$this->queue->save();