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

Don't call constructors when stubbing objects #4

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

acoulton
Copy link
Member

We are/should already be specifying defaults for all the properties, so it doesn't matter what the constructor does as we will be immediately resetting the object state to our expected values anyway.

This is equivalent to e.g. Doctrine hydrating from a database record.

We are/should already be specifying defaults for all the properties, so
it doesn't matter what the constructor does as we will be immediately
resetting the object state to our expected values anyway.

This is equivalent to e.g. Doctrine hydrating from a database record.
@acoulton acoulton enabled auto-merge November 27, 2024 13:15
@acoulton acoulton merged commit acee721 into 0.1.x Nov 27, 2024
3 checks passed
@acoulton acoulton deleted the 0.1-skip-constructor branch November 27, 2024 13:15
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.

1 participant