Skip to content

v2.0.0

Compare
Choose a tag to compare
@gmazzap gmazzap released this 24 May 15:12
· 247 commits to master since this release

Changed

  • [BREAKING] API entry-points are now functions and not methods (also Actions::expectFired() is now Actions\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_action is now changed to include closure arguments and distinguish normal closures from static closures
  • Relaxed callable check: function that requires callable arguments (like add_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

Fixed

  • Adding expectations for added filters without returning argument expectation does not break apply_filters default behavior. See #16

Migrating from v1 guide available here: https://brain-wp.github.io/BrainMonkey/docs/migrating-from-v1.html