diff --git a/ChangeLog-7.5.md b/ChangeLog-7.5.md index 25346660550..58902d9b046 100644 --- a/ChangeLog-7.5.md +++ b/ChangeLog-7.5.md @@ -6,6 +6,7 @@ All notable changes of the PHPUnit 7.5 release series are documented in this fil ### Fixed +* Fixed [#3480](https://github.com/sebastianbergmann/phpunit/issues/3480): Wrong return type declaration for `TestCase::getExpectedExceptionMessage()` and `TestCase::getExpectedExceptionMessageRegExp()` * Fixed [#3550](https://github.com/sebastianbergmann/phpunit/issues/3550): Check for valid attribute names in `assertObjectHasAttribute()` is too strict ## [7.5.6] - 2019-02-18 diff --git a/src/Framework/TestCase.php b/src/Framework/TestCase.php index ce229c0c40e..9b55f2a9b33 100644 --- a/src/Framework/TestCase.php +++ b/src/Framework/TestCase.php @@ -118,12 +118,12 @@ abstract class TestCase extends Assert implements Test, SelfDescribing private $expectedException; /** - * @var string + * @var null|string */ private $expectedExceptionMessage; /** - * @var string + * @var null|string */ private $expectedExceptionMessageRegExp; @@ -569,12 +569,12 @@ public function getExpectedExceptionCode() return $this->expectedExceptionCode; } - public function getExpectedExceptionMessage(): string + public function getExpectedExceptionMessage(): ?string { return $this->expectedExceptionMessage; } - public function getExpectedExceptionMessageRegExp(): string + public function getExpectedExceptionMessageRegExp(): ?string { return $this->expectedExceptionMessageRegExp; }