Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@uuf6429
Copy link
Contributor

@uuf6429 uuf6429 commented May 4, 2025

This started out from this suggestion, but then I saw a few other issues which I also fixed:

  • exception message should be checked first since failures would be more informative (original issue)
    • also applies to message pattern matching
  • many expectException()+expectExceptionMessage() cases could be replaced with expectExceptionObject()
  • in a few cases we expected the exception too early, which could have hidden the real source of failure
  • minor code style improvement: blank line between expectation and action

@codecov
Copy link

codecov bot commented May 4, 2025

Codecov Report

All modified and coverable lines are covered by tests βœ…

Project coverage is 95.48%. Comparing base (e07986e) to head (5917c1e).
Report is 4 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master     #310   +/-   ##
=========================================
  Coverage     95.48%   95.48%           
  Complexity      598      598           
=========================================
  Files            35       35           
  Lines          1796     1796           
=========================================
  Hits           1715     1715           
  Misses           81       81           
Flag Coverage Ξ”
php8.1 95.48% <ΓΈ> (ΓΈ)
php8.1--with=symfony/yaml:^5.4 95.48% <ΓΈ> (ΓΈ)
php8.1--with=symfony/yaml:^6.4 95.48% <ΓΈ> (ΓΈ)
php8.2 95.48% <ΓΈ> (ΓΈ)
php8.3 95.48% <ΓΈ> (ΓΈ)
php8.4 95.48% <ΓΈ> (ΓΈ)

Flags with carried forward coverage won't be shown. Click here to find out more.

β˜” View full report in Codecov by Sentry.
πŸ“’ Have feedback on the report? Share it here.

Copy link
Contributor

@acoulton acoulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @uuf6429 this is good as-is, but if you have time to add the expected TableNode messages as well that'd be great.

@uuf6429 uuf6429 requested a review from acoulton May 4, 2025 12:20
Copy link
Contributor

@acoulton acoulton left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, thanks :)

@acoulton acoulton requested a review from carlos-granados May 4, 2025 17:00
Copy link
Contributor

@carlos-granados carlos-granados left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, thanks @uuf6429

@acoulton acoulton merged commit 163e476 into Behat:master May 5, 2025
10 checks passed
@uuf6429 uuf6429 deleted the chore/reverse-exception-assertions branch May 5, 2025 15:22
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.

3 participants