diff --git a/src/Framework/TestCase.php b/src/Framework/TestCase.php index cb77c90568..e17779d3ee 100644 --- a/src/Framework/TestCase.php +++ b/src/Framework/TestCase.php @@ -1083,7 +1083,7 @@ final protected function expectExceptionMessageMatches(string $regularExpression * Information for expected exception class, expected exception message, and * expected exception code are retrieved from a given Exception object. */ - final protected function expectExceptionObject(\Exception $exception): void + final protected function expectExceptionObject(Throwable $exception): void { $this->expectException($exception::class); $this->expectExceptionMessage($exception->getMessage());