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
@jacekkarczmarczyk: it happens because when PHPUnit detects you're mocking an interface that extends Throwable, PHPUnit returns an Exception mock instead [1].
But on Exception, getMessage is final therefore you see the error.
Summary
$mock->method('getMessage')
fails for interface that extendsThrowable
Current behavior
testRealThrowable
fails with error:How to reproduce
Expected behavior
Both tests pass
The text was updated successfully, but these errors were encountered: