diff --git a/tests/Integration/Console/Scheduling/SubMinuteSchedulingTest.php b/tests/Integration/Console/Scheduling/SubMinuteSchedulingTest.php index bc7b98d5b1b4..05f220576f79 100644 --- a/tests/Integration/Console/Scheduling/SubMinuteSchedulingTest.php +++ b/tests/Integration/Console/Scheduling/SubMinuteSchedulingTest.php @@ -101,7 +101,7 @@ public function test_sub_minute_scheduling_can_be_interrupted() Sleep::whenFakingSleep(function ($duration) use ($startedAt) { Carbon::setTestNow(now()->add($duration)); - if (now()->diffInSeconds($startedAt) >= 30) { + if ($startedAt->diffInSeconds() >= 30) { $this->artisan('schedule:interrupt') ->expectsOutputToContain('Broadcasting schedule interrupt signal.'); } @@ -130,11 +130,11 @@ public function test_sub_minute_events_stop_for_the_rest_of_the_minute_once_main Sleep::whenFakingSleep(function ($duration) use ($startedAt) { Carbon::setTestNow(now()->add($duration)); - if (now()->diffInSeconds($startedAt) >= 30 && ! $this->app->isDownForMaintenance()) { + if ($startedAt->diffInSeconds() >= 30 && ! $this->app->isDownForMaintenance()) { $this->artisan('down'); } - if (now()->diffInSeconds($startedAt) >= 40 && $this->app->isDownForMaintenance()) { + if ($startedAt->diffInSeconds() >= 40 && $this->app->isDownForMaintenance()) { $this->artisan('up'); } });