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
But I'm explicitly expecting a warning here. My test covers this through error_get_last as a workaround; however, it would be nice to simply:
it('emits a warning', function() {
trigger_error('warn', E_USER_WARNING);
})->expectWarningMessage('warn');
Similar to how exceptions can be checked.
I'd prefer to throw an exception in my library; however, that would be disastrous since nothing would break unless the library is used in a particular way. So, a warning is emitted so that the developer can either ignore it or choose to throw an exception if it effects them.
The text was updated successfully, but these errors were encountered:
I see a nice yellow WARN:
But I'm explicitly expecting a warning here. My test covers this through
error_get_last
as a workaround; however, it would be nice to simply:Similar to how exceptions can be checked.
I'd prefer to throw an exception in my library; however, that would be disastrous since nothing would break unless the library is used in a particular way. So, a warning is emitted so that the developer can either ignore it or choose to throw an exception if it effects them.
The text was updated successfully, but these errors were encountered: