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 89881c6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tests/Integration/Console/CommandDurationThresholdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -198,4 +198,12 @@ public function testUsesTheConfiguredDateTimezone()

$this->assertSame('Australia/Melbourne', $startedAt->timezone->getName());
}

public function testItHandlesCallingTerminateWithoutHandle()
{
$this->app[Kernel::class]->terminate(new StringInput('foo'), 21);

// this is a placeholder just to show that the above did not throw an exception.
$this->assertTrue(true);
}
}
8 changes: 8 additions & 0 deletions tests/Integration/Http/RequestDurationThresholdTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,4 +186,12 @@ public function testItClearsStartTimeAfterHandlingRequest()
$kernel->terminate($request, $response);
$this->assertNull($kernel->requestStartedAt());
}

public function testItHandlesCallingTerminateWithoutHandle()
{
$this->app[Kernel::class]->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 89881c6

Please sign in to comment.