-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
chore: do not perform type analysis in tests #7852
chore: do not perform type analysis in tests #7852
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am in favour of this change, since I find it superfluous to make such assertions, but I think we need to wait for @keradus' opinion. I can only guess what was the reasoning and I think it's more about ensuring that our internal classes provide interface instead of being concrete-only classes. Yeah, most probably removing implements X
would lead to other failures or inability to test things properly, but I guess that these are "architectural" assertions, and I won't merge this change on my own.
There's always an option to introduce tools like Arkitect or other, to ensure such design constraints are matched.
'weird' | ||
); | ||
|
||
self::assertInstanceOf(\InvalidArgumentException::class, $exception); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no clue why we have tests like those.
I believe they cause no harm, but also no huge benefit behind them.
IE, we rely that result of function foo(): Date
is Date without making utest for result type
Thanks @kubawerlos 🍻! |
Related to the currently failing CI on the main branch.