Mocking utility for PHP functions and WordPress plugin API
MIT License
Bot releases are visible (Hide)
Filters\has
(props @shvlv)ClosureParamStringForm
compat with PHP 5.6 (props @jrfnl)Published by gmazzap almost 4 years ago
esc_xml()
, wp_json_encode
, user_trailingslashit()
, _n
, and _nx
(props @jrfnl)Published by gmazzap about 4 years ago
HooksStorage::hookPriority
(internal)has_filter
/ has_action
return true instead of the added priotity. (See #79 props @widoz)Published by gmazzap about 4 years ago
Nothing
UnitTestCase
parent classNothing
Published by gmazzap about 4 years ago
Nothing.
Nothing.
Published by gmazzap almost 5 years ago
do_action_deprecated
and apply_filters_deprecated
HookStorage::parseArgsToAdd
, props @szepeviktorPublished by gmazzap about 5 years ago
byDefault
needs to be allowed for functions expectationsPublished by gmazzap about 5 years ago
Actions\expectRemoved
and Filters\expectRemoved
(see #45)Functions\stubTranslationFunctions()
Functions\stubEscapeFunctions()
is_wp_error()
and absint
@throws
occurrencesPublished by gmazzap over 5 years ago
Published by gmazzap almost 7 years ago
Nothing
Nothing
Published by gmazzap about 7 years ago
patchwork-loader.php
which loads Patchwork, is not loaded from Composer autoload, but manually on setUp()
or on first container instantiation, based on what occurs first.Functions\stubs()
API method for multiple function definitions.Published by gmazzap about 7 years ago
Nothing
Nothing
Published by gmazzap over 7 years ago
Nothing
Nothing
Published by gmazzap over 7 years ago
apply_filters
behavior to fix 100% of cases in #16Nothing
Nothing
Published by gmazzap over 7 years ago
Actions::expectFired()
is now Actions\expectDone()
)->zeroOrMoreTimes()
to ->atLeast()->once()
has_filter
/ has_action
is now changed to include closure arguments and distinguish normal closures from static closurescallable
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)__return_true
& co) (see https://github.com/Brain-WP/BrainMonkey/blob/master/inc/wp-helper-functions.php )doing_action()
and doing_filter()
in callbacks used to respond to hooksandReturnFirstArg()
expectation methodandAlsoExpectIt()
expectation methodapply_filters
default behavior. See #16Migrating from v1 guide available here: https://brain-wp.github.io/BrainMonkey/docs/migrating-from-v1.html
Published by gmazzap almost 8 years ago
has_action()
/ has_filter()
can now be called with just hook name and they will return true
if the given hook has any callback attached (just like they work in core). See #18Nothing
Nothing
Published by gmazzap about 8 years ago
did_action()
/ Filters::apllied()
now works with hooks that contain special charsNothing
Nothing
Published by gmazzap over 8 years ago
Hooks::sanitizeHookName()
is a static function that was called dynamicallyPublished by gmazzap over 8 years ago
>=5.4
) in composer.json
nothing
Published by gmazzap over 8 years ago
justEcho()
and echoArg()