Repository navigation
v2.0.0
Changed
- [BREAKING] API entry-points are now functions and not methods (also
Actions::expectFired()is nowActions\expectDone()) - [BREAKING] Setup workflow (see https://brain-wp.github.io/BrainMonkey/docs/functions-setup.html and https://brain-wp.github.io/BrainMonkey/docs/wordpress-setup.html)
- [BREAKING] Default "times" expectation is changed from Mockery default
->zeroOrMoreTimes()to->atLeast()->once() - [BREAKING] Closure string representation that can be used with
has_filter/has_actionis now changed to include closure arguments and distinguish normal closures from static closures - Relaxed
callablecheck: function that requirescallablearguments (likeadd_action/add_filter), does not throw exception if the given supposed-to-be callable is not available (e.g. not mocked function or not loaded class) - Updated Patchwork to version 2
Added
- Custom exceptions classes
- Stubs for some WordPress utility functions (
__return_true& co) (see https://github.com/Brain-WP/BrainMonkey/blob/master/inc/wp-helper-functions.php ) - Support for
doing_action()anddoing_filter()in callbacks used to respond to hooks andReturnFirstArg()expectation methodandAlsoExpectIt()expectation method
Fixed
- Adding expectations for added filters without returning argument expectation does not break
apply_filtersdefault behavior. See #16
Migrating from v1 guide available here: https://brain-wp.github.io/BrainMonkey/docs/migrating-from-v1.html