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
I have a long exception message which has a lot of garbage in, but a few elements I want to check the presence of.
So I figured I'd call self::expectExceptionMessage() several times to assert these elements, however it seems that only the last call takes effect. That makes sense as that method just sets the expectedExceptionMessage property, but I thought it might be nice if it would collect a list of assertions to make instead of just overwrite.
Anyway as a workaround to make two assertions I now have expectExceptionMessage + expectExceptionMessageMatches, as both are preserved and checked.
The text was updated successfully, but these errors were encountered:
Right that'd have been my next option if I had to but I figured it could be nice if PHPUnit accepted multiple, or if not maybe it should throw if something is set already because it's kinda swallowing assertions silently right now.
I have a long exception message which has a lot of garbage in, but a few elements I want to check the presence of.
So I figured I'd call
self::expectExceptionMessage()
several times to assert these elements, however it seems that only the last call takes effect. That makes sense as that method just sets the expectedExceptionMessage property, but I thought it might be nice if it would collect a list of assertions to make instead of just overwrite.Anyway as a workaround to make two assertions I now have expectExceptionMessage + expectExceptionMessageMatches, as both are preserved and checked.
The text was updated successfully, but these errors were encountered: