File tree Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Expand file tree Collapse file tree 4 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,7 @@ public function test_it_gracefully_handles_exceptions_while_resolving_user_ids()
251251
252252 public function test_it_does_not_actively_resolve_guards (): void
253253 {
254+ $ this ->fakeIngest ();
254255 Route::get ('/test ' , fn () => 'ok ' );
255256
256257 $ response = $ this ->get ('/test ' );
Original file line number Diff line number Diff line change 2727use function array_combine ;
2828use function array_intersect_key ;
2929use function collect ;
30+ use function dd ;
3031use function env ;
3132use function fopen ;
3233use function method_exists ;
@@ -47,11 +48,12 @@ protected function setUp(): void
4748 {
4849 $ _ENV ['APP_BASE_PATH ' ] = realpath (__DIR__ .'/../workbench/ ' ).'/ ' ;
4950
51+ Nightwatch::handleUnrecoverableExceptionsUsing (fn ($ e ) => dd ($ e ));
52+
5053 parent ::setUp ();
5154
5255 Http::preventStrayRequests ();
5356
54- Nightwatch::handleUnrecoverableExceptionsUsing (fn ($ e ) => throw $ e );
5557 Compatibility::$ context = [];
5658
5759 $ this ->core = $ this ->app ->make (Core::class);
Original file line number Diff line number Diff line change @@ -14,8 +14,10 @@ class GuzzleMiddlewareTest extends TestCase
1414 public function test_it_gracefully_handles_exceptions_in_the_before_middleware (): void
1515 {
1616 $ exceptions = [];
17- $ this ->core ->sensor ->exceptionSensor = function ($ e ) use (&$ exceptions ): void {
17+ $ this ->core ->sensor ->exceptionSensor = function ($ e ) use (&$ exceptions ): array {
1818 $ exceptions [] = $ e ;
19+
20+ return [];
1921 };
2022 $ thrownInMicrotimeResolver = false ;
2123 $ this ->core ->clock ->microtimeResolver = function () use (&$ thrownInMicrotimeResolver ): float {
Original file line number Diff line number Diff line change @@ -224,7 +224,7 @@ public function test_it_samples_on_exception(): void
224224 {
225225 $ ingest = $ this ->fakeIngest ();
226226 $ this ->core ->config ['sampling ' ]['requests ' ] = 0 ;
227- $ this ->core ->sensor ->exceptionSensor = fn () => null ;
227+ $ this ->core ->sensor ->exceptionSensor = fn () => [] ;
228228 $ exception = new RuntimeException ('Whoops! ' );
229229 Route::get ('/users ' , fn () => throw $ exception );
230230
You can’t perform that action at this time.
0 commit comments