From 087f0381075a94bf9643759dd73dc80272a1ce25 Mon Sep 17 00:00:00 2001 From: Tim MacDonald Date: Wed, 28 Jun 2023 18:12:50 +1000 Subject: [PATCH] add test --- .../Http/RequestDurationThresholdTest.php | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/Integration/Http/RequestDurationThresholdTest.php b/tests/Integration/Http/RequestDurationThresholdTest.php index 421981dda0eb..7ae8c44aa321 100644 --- a/tests/Integration/Http/RequestDurationThresholdTest.php +++ b/tests/Integration/Http/RequestDurationThresholdTest.php @@ -186,4 +186,16 @@ public function testItClearsStartTimeAfterHandlingRequest() $kernel->terminate($request, $response); $this->assertNull($kernel->requestStartedAt()); } + + public function testItHandlesCallingTerminateWithoutHandle() + { + Route::get('test-route', fn () => 'ok'); + $called = false; + $kernel = $this->app[Kernel::class]; + + $kernel->terminate(Request::create('http://localhost/test-route'), new Response); + + // this is a placeholder just to show that the above did not throw an exception. + $this->assertTrue(true); + } }