Skip to content

Conversation

adrienlucas
Copy link

Q A
Bug fix? no
New feature? no
Issues Fix silently failing tests
License MIT

This tries to fix two little mistakes :

  • the expectException should never be used twice in a test (because it does not actually try/catch, the first exception will stop the execution of the test and will be catched outside).
  • the piece of code that is expected to throw an exception should always come last in the test (because again, no try/catch, so any line after the throwing line will not be executed).

@smnandre
Copy link
Member

Thank you @adrienlucas !

@carsonbot carsonbot added Status: Reviewed Has been reviewed by a maintainer and removed Status: Needs Review Needs to be reviewed labels Apr 30, 2024
@kbond
Copy link
Member

kbond commented Apr 30, 2024

Excellent catch Adrien, thank you!

@kbond kbond merged commit 749b13e into symfony:2.x Apr 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Status: Reviewed Has been reviewed by a maintainer TwigComponent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants