Skip to content
This repository has been archived by the owner on Feb 17, 2022. It is now read-only.

Commit

Permalink
Modified test now to static datetime.
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkGhostHunter committed Sep 5, 2021
1 parent 60da629 commit 2712548
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/LaraguardTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Illuminate\Foundation\Testing\DatabaseMigrations;
use Illuminate\Foundation\Testing\WithFaker;
use Illuminate\Http\Request;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Cookie;
use Illuminate\Validation\ValidationException;
Expand All @@ -31,7 +32,7 @@ protected function setUp() : void
$this->afterApplicationCreated([$this, 'createTwoFactorUser']);
$this->afterApplicationCreated(function (): void {
app('config')->set('auth.providers.users.model', UserTwoFactorStub::class);
$this->travelTo(today());
Carbon::setTestNow(today());
});
parent::setUp();
}
Expand Down

0 comments on commit 2712548

Please sign in to comment.