Skip to content
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

Make ExceptionMessage constraint strict, expectedException can handle only expected class, not message nor code #3326

Conversation

keradus
Copy link
Contributor

@keradus keradus commented Oct 6, 2018

Closes #3325

Commit logs are meaningful.

As described in ticket, this change may be consider a little bigger than it appears on first look.
Eg, changing strpos to === in constraint makes (by purpose) partial message not working anymore, and @expectedException \ClassOfException Message Code annotation, well, make no sense anymore - as Message can be exactly one, single word - and without partial exception, it's pointless...

@codecov-io
Copy link

codecov-io commented Oct 6, 2018

Codecov Report

Merging #3326 into 6.5 will decrease coverage by 0.01%.
The diff coverage is 80%.

Impacted file tree graph

@@             Coverage Diff              @@
##                6.5    #3326      +/-   ##
============================================
- Coverage     80.14%   80.12%   -0.02%     
+ Complexity     2854     2851       -3     
============================================
  Files           105      105              
  Lines          7529     7523       -6     
============================================
- Hits           6034     6028       -6     
  Misses         1495     1495
Impacted Files Coverage Δ Complexity Δ
src/Util/Test.php 94.39% <100%> (-0.05%) 196 <0> (-2)
src/Framework/Constraint/ExceptionMessage.php 77.77% <66.66%> (-2.23%) 6 <0> (-1)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 488da46...c32ca3e. Read the comment docs.

@sebastianbergmann sebastianbergmann merged commit d173bf1 into sebastianbergmann:6.5 Oct 9, 2018
@sebastianbergmann
Copy link
Owner

Can you please send a pull request for 7.4? Thanks!

@TomasVotruba
Copy link

Thank you 👍

@keradus
Copy link
Contributor Author

keradus commented Oct 11, 2018

sure, here it is #3343

@guilliamxavier
Copy link
Contributor

For the record: this was merged but then reverted in branch 6.5 (because a BC break)

#3325 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants