diff --git a/src/Mixins/Expectation.php b/src/Mixins/Expectation.php index 64235cfc..5823d61c 100644 --- a/src/Mixins/Expectation.php +++ b/src/Mixins/Expectation.php @@ -823,7 +823,7 @@ final class Expectation try { ($this->value)(); - } catch (Throwable $e) { // @phpstan-ignore-line + } catch (Throwable $e) { if (!class_exists($exception)) { if ($e instanceof Error && $e->getMessage() === "Class \"$exception\" not found") { throw $e;