-
Notifications
You must be signed in to change notification settings - Fork 175
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ensure run at is always returned to the front end in UTC
- Loading branch information
1 parent
17353de
commit 691e51a
Showing
2 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Carbon; | ||
use Laravel\Pulse\Livewire\SlowQueries; | ||
use Livewire\Livewire; | ||
|
||
it('always returns the run at date in UTC time', function () { | ||
date_default_timezone_set('Australia/Melbourne'); | ||
Carbon::setTestNow(Carbon::createFromFormat('Y-m-d H:i:s', '2000-01-01 13:00:00', 'UTC')); | ||
|
||
Livewire::test(SlowQueries::class, ['lazy' => false, 'disableHighlighting' => true]) | ||
->assertSeeHtml(<<<'HTML' | ||
Run at: ${formatDate('2000-01-01 13:00:00')} | ||
HTML); | ||
}); | ||
|