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()
251
251
252
252
public function test_it_does_not_actively_resolve_guards (): void
253
253
{
254
+ $ this ->fakeIngest ();
254
255
Route::get ('/test ' , fn () => 'ok ' );
255
256
256
257
$ response = $ this ->get ('/test ' );
Original file line number Diff line number Diff line change 27
27
use function array_combine ;
28
28
use function array_intersect_key ;
29
29
use function collect ;
30
+ use function dd ;
30
31
use function env ;
31
32
use function fopen ;
32
33
use function method_exists ;
@@ -47,11 +48,12 @@ protected function setUp(): void
47
48
{
48
49
$ _ENV ['APP_BASE_PATH ' ] = realpath (__DIR__ .'/../workbench/ ' ).'/ ' ;
49
50
51
+ Nightwatch::handleUnrecoverableExceptionsUsing (fn ($ e ) => dd ($ e ));
52
+
50
53
parent ::setUp ();
51
54
52
55
Http::preventStrayRequests ();
53
56
54
- Nightwatch::handleUnrecoverableExceptionsUsing (fn ($ e ) => throw $ e );
55
57
Compatibility::$ context = [];
56
58
57
59
$ 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
14
14
public function test_it_gracefully_handles_exceptions_in_the_before_middleware (): void
15
15
{
16
16
$ exceptions = [];
17
- $ this ->core ->sensor ->exceptionSensor = function ($ e ) use (&$ exceptions ): void {
17
+ $ this ->core ->sensor ->exceptionSensor = function ($ e ) use (&$ exceptions ): array {
18
18
$ exceptions [] = $ e ;
19
+
20
+ return [];
19
21
};
20
22
$ thrownInMicrotimeResolver = false ;
21
23
$ 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
224
224
{
225
225
$ ingest = $ this ->fakeIngest ();
226
226
$ this ->core ->config ['sampling ' ]['requests ' ] = 0 ;
227
- $ this ->core ->sensor ->exceptionSensor = fn () => null ;
227
+ $ this ->core ->sensor ->exceptionSensor = fn () => [] ;
228
228
$ exception = new RuntimeException ('Whoops! ' );
229
229
Route::get ('/users ' , fn () => throw $ exception );
230
230
You can’t perform that action at this time.
0 commit comments