10000 Remove useless parent method calls in tests by alexandre-daubois · Pull Request #58374 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Remove useless parent method calls in tests #58374

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

Merged
merged 1 commit into from
Sep 27, 2024

Conversation

alexandre-daubois
Copy link
Member
Q A
Branch? 7.2
Bug fix? no
New feature? no
Deprecations? no
Issues -
License MIT

The vast majority of tests don't call these parent methods, because they are no op. There are a few places where they are called, let's remove them?

@GromNaN
Copy link
Member
GromNaN commented Sep 24, 2024

Note aside, in my opinion we should use @before/@after instead of setUp/tearDown so that we never have to call the parent. Calling the parent is a safety practice to ensure there is no missing logic in the parent class, even if it get added later.

@fabpot
Copy link
Member
fabpot commented Sep 27, 2024

Thank you @alexandre-daubois.

@fabpot fabpot merged commit d67a0bb into symfony:7.2 Sep 27, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0