-
Notifications
You must be signed in to change notification settings - Fork 71
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
Add AnyInstance matcher. Fix #160 #161
Conversation
Maybe can be merged into FuzzyObject.
Previously it would only work both classes were subclasses of a common parent. Now it matches if there is a sub-class/parent-class relationship between the two classes.
Add AnyInstance matcher
The changes to Maybe that should be moved into |
hey @unfulvio-godaddy , is there anything I can do to help get this merged? I've been using it extensively since before the PR and it's been smooth. |
this looks good, thank you @BrianHenryIE probably in the future we are going to introduce some PHPCS standards to improve on code consistency, but right now I'd like to have this merged since it addressed the problem outlined in some issues and seems fairly straightforward without breaking changes --- thanks |
Description of the Change
Adds a new matcher,
AnyInstance
to allow usingexpectActionAdded
andexpectFilterAdded
without having a reference to the object that will be added to the hook. e.g.Alternate Designs, Benefits, Possible Drawbacks
Discussed in #160, opened in January 2021, which references six further related issues.
Maybe this should be part of
Functions::type( $type )
.Verification Process
The existing tests were failing, so I'm not certain.Checklist:
The existing tests were already failing.Applicable Issues
#160, #8, #80, #93, #127, #143, #12.
Changelog Entry
Included in the PR at: CHANGELOG.md