diff --git a/src/ExceptionAssertions.php b/src/ExceptionAssertions.php index 5086390..cfa1589 100644 --- a/src/ExceptionAssertions.php +++ b/src/ExceptionAssertions.php @@ -94,7 +94,9 @@ public function assertNoExceptionsThrown(callable $callback) : void $thrownException, \sprintf( 'Failed asserting that no exceptions was thrown, exception of type "%1$s was thrown.', - \get_class($thrownException), + $thrownException === null + ? 'N/A' + : \get_class($thrownException), ), ); }