You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public function getExpectedException(): ?string
{
return $this->expectedException;
}
public function getExpectedExceptionMessage(): string
{
return $this->expectedExceptionMessage;
}
public function getExpectedExceptionMessageRegExp(): string
{
return $this->expectedExceptionMessageRegExp;
}
Due to the fact that both expectedExceptionMessage and expectedExceptionMessageRegExp are declared but not initialized on instantiation, there is a chance that when called, they violate their requirement to return a string.
Proposed solution. Make them optionally return a string just like expectedException allows for.
@sebastianbergmann thoughts? I'm happy to produce the PR if you are good with this direction.
The text was updated successfully, but these errors were encountered:
slaughter550
changed the title
Return value of PHPUnit\Framework\TestCase::getExpectedExceptionMessage() must be of the type string, null returned
Proposed Fix of Return value of PHPUnit\Framework\TestCase::getExpectedExceptionMessage() must be of the type string, null returned
Jan 14, 2019
In
https://github.com/sebastianbergmann/phpunit/blob/7.5/src/Framework/TestCase.php
, there are the following variable declarationsand the following getters
Due to the fact that both
expectedExceptionMessage
andexpectedExceptionMessageRegExp
are declared but not initialized on instantiation, there is a chance that when called, they violate their requirement to return a string.Proposed solution. Make them optionally return a string just like
expectedException
allows for.@sebastianbergmann thoughts? I'm happy to produce the PR if you are good with this direction.
The text was updated successfully, but these errors were encountered: