-
Notifications
You must be signed in to change notification settings - Fork 182
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[1.x] Ensure run at is always returned to the front end in UTC (#425)
* ensure run at is always returned to the front end in UTC * Fix code styling --------- Co-authored-by: timacdonald <[email protected]>
- Loading branch information
1 parent
17353de
commit 8e0107f
Showing
2 changed files
with
16 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,15 @@ | ||
<?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); | ||
}); |