Merge branch '4.x' into 5.x

This commit is contained in:
nuno maduro
2026-05-13 12:20:46 +01:00
4 changed files with 34 additions and 1 deletions

View File

@ -954,6 +954,7 @@ final class Expectation
} catch (Throwable $e) {
if ($exception instanceof Throwable) {
// @phpstan-ignore-next-line
expect($e)
->toBeInstanceOf($exception::class, $message)
->and($e->getMessage())->toBe($exceptionMessage ?? $exception->getMessage(), $message);