diff --git a/src/Test/TestLogger.php b/src/Test/TestLogger.php index d96af29..067a1c6 100644 --- a/src/Test/TestLogger.php +++ b/src/Test/TestLogger.php @@ -33,6 +33,8 @@ public function __construct(bool $placeholderInterpolation = false) */ public function log($level, string|\Stringable $message, array $context = []): void { + assert(isset($context['exception']) ? $context['exception'] instanceof \Throwable : true); + if ($this->placeholderInterpolation === true) { $message = $this->interpolate($message, $context); }