-
-
Notifications
You must be signed in to change notification settings - Fork 157
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
Use dedicated assertInstanceOf assertion #181
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.
@carusogabriel Thanks for filing this PR, I can see some use for this 👍
I'm currently undecided because this was actually done on purpose. While the assertInstanceOf()
method does indeed provide some better error reporting in case of a test failure (is this a real issue here?), using instanceof
aids with static analysis and IDEs, so that it "understands" the methods that are invoked after this check.
Just sharing my thoughts for now, I guess I'm okay with it either way.
At least PHPStorm also understands assertInstanceOf for static analysis IIRC. |
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.
@carusogabriel Thanks for looking into this and for your patience!
Changes LGTM, let's get this in 👍
Using this dedicated assertion, we can have better error messages: