Skip to content

Commit

Permalink
Also cover the change in a test
Browse files Browse the repository at this point in the history
  • Loading branch information
wjzijderveld committed Sep 30, 2024
1 parent 16c179c commit 4456894
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Monolog/Handler.php
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,9 @@ private function getMonologExtraData(array $context): array
return $extraData;
}

/**
* @param mixed[] $context
*/
private function hasExceptionContext(array $context): bool
{
return isset($context[self::CONTEXT_EXCEPTION_KEY]) && $context[self::CONTEXT_EXCEPTION_KEY] instanceof \Throwable;
Expand Down
2 changes: 2 additions & 0 deletions tests/Monolog/HandlerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,7 @@ public static function handleDataProvider(): iterable
[
'foo' => 'bar',
'bar' => 'baz',
'exception' => 'just a message',
],
[]
),
Expand All @@ -280,6 +281,7 @@ public static function handleDataProvider(): iterable
'monolog.context' => [
'foo' => 'bar',
'bar' => 'baz',
'exception' => 'just a message',
],
],
];
Expand Down

0 comments on commit 4456894

Please sign in to comment.