generated from spatie/package-skeleton-laravel
-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of github.com:paulo-hortelan/requests-graph-pulse
- Loading branch information
Showing
8 changed files
with
79 additions
and
41 deletions.
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
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
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,42 @@ | ||
<?php | ||
|
||
use Illuminate\Support\Carbon; | ||
use Laravel\Pulse\Facades\Pulse; | ||
use Livewire\Livewire; | ||
use PauloHortelan\RequestsGraphPulse\Livewire\RequestsGraph; | ||
|
||
// it('includes the card on the dashboard', function () { | ||
// $this | ||
// ->get('/pulse') | ||
// ->assertSeeLivewire(RequestsGraph::class); | ||
// }); | ||
|
||
// it('renders 4xx requests', function () { | ||
// $request1 = json_encode(['GET', '/users', 418, null]); | ||
// $request2 = json_encode(['GET', '/users/{user}', 403, null]); | ||
|
||
// // Add entries outside of the window. | ||
// Carbon::setTestNow('2000-01-01 12:00:00'); | ||
// Pulse::record('4xx_request', $request1, now()->timestamp)->max()->count(); | ||
// Pulse::record('4xx_request', $request2, now()->timestamp)->max()->count(); | ||
|
||
// // Add entries to the "tail". | ||
// Carbon::setTestNow('2000-01-01 12:00:01'); | ||
// Pulse::record('4xx_request', $request1, now()->timestamp)->max()->count(); | ||
// Pulse::record('4xx_request', $request1, now()->timestamp)->max()->count(); | ||
// Pulse::record('4xx_request', $request2, now()->timestamp)->max()->count(); | ||
|
||
// // Add entries to the current buckets. | ||
// Carbon::setTestNow('2000-01-01 13:00:00'); | ||
// Pulse::record('4xx_request', $request1, now()->timestamp)->max()->count(); | ||
// Pulse::record('4xx_request', $request1, now()->timestamp)->max()->count(); | ||
// Pulse::record('4xx_request', $request2, now()->timestamp)->max()->count(); | ||
|
||
// Pulse::store(); | ||
|
||
// Livewire::test(FourXxCard::class, ['lazy' => false]) | ||
// ->assertViewHas('fourXxRequests', collect([ | ||
// (object) ['method' => 'GET', 'uri' => '/users', 'status' => 418, 'count' => '4.00', 'latest' => now()], | ||
// (object) ['method' => 'GET', 'uri' => '/users/{user}', 'status' => 403, 'count' => '2.00', 'latest' => now()], | ||
// ])); | ||
// }); |
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