Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
  • Loading branch information
timacdonald committed Jun 28, 2023
1 parent 8727404 commit 087f038
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions tests/Integration/Http/RequestDurationThresholdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 087f038

Please sign in to comment.