-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch for exception message expectations #1358
Patch for exception message expectations #1358
Conversation
add failing testes for TestCase @expectExceptionMessageRegExp awareness
…\ExceptionMessageRegExp
…d invalid regex edge case
Patch for exception message expectations
Thanks again, @marcioAlmada! |
Thank you too. Hope we can move to #1356 now. |
Thanks a lot @marcioAlmada! Just a minor note: Would be great to squash/fixup commits into 2-3 (next time), so as to have a clean history in the mainline. If someone needs to figure out why the code works like it does in the future, they'll highly appreciate it 😉 |
@sun It tend to add a failing and a passing commit for each step I take, specially when I'm doing a PR which could potentially become a work in progress PR (when history needs to be exposed gradually), but I would have no problems if commits were squashed by someone else (@whatthejeff) since I usually delete my feature branch and pull from master later. |
Changes:
@expectedExceptionMessageRegExp
annotation@expectedExceptionMessage
, keeps the tests introduced by Regex aware @expectedExceptionMessage #1264@expectedExceptionMessage
and@expectedExceptionMessageRegExp
can now be used simultaneouslyRelates to: #1266 #1264 #1263
Things not exactly related to this PR that I think we could do better:
TestCase::setExpectedException
vsTestCase::setExpectedExceptionRegex
, but it was the only sane way to keep the feature since there are no granular methods likeTestCase::setExpectedExceptionMessage
orTestCase::setExpectedExceptionCode
. Any ideas?Util\Test
class, and it can be kinda tricky to expand the API (look at how much edits I had to do just to achieve a minor tweak). There are many annotations libraries around, I recommend to pick one ;). I could make a PR to improve this in the future.