brain/monkey
Mocking utility for PHP functions and WordPress plugin API
Maintainers
Requires
- php: >=5.6.0
- antecedent/patchwork: ^2.1.17
- mockery/mockery: ~1.3.6 || ~1.4.4 || ~1.5.1 || ^1.6.10
Requires (Dev)
- dealerdirect/phpcodesniffer-composer-installer: ^1.0.0
- phpcompatibility/php-compatibility: ^9.3.0
- phpunit/phpunit: ^5.7.27 || ^6.5.14 || ^7.5.20 || ^8.5.49 || ^9.6.30
Suggests
None
Provides
None
Conflicts
None
Replaces
None
MIT ea3aeb3d559ba3c0930b3f4d210b665a4c044d83
- Giuseppe Mazzapica <giuseppe.mazzapica.woop@gmail.com>
testingtestmockerymockrunkitredefinitionMonkey Patchinginterceptionpatchworkmock functions
This package is auto-updated.
Last update: 2026-06-05 22:12:48 UTC
README
Brain Monkey
👁 PHP Quality Assurance
👁 codecov
Brain Monkey is a tests utility for PHP.
It provides two set of helpers:
- the first are framework-agnostic tools that allow to mock (or monkey patch) and to test behavior of any PHP function
- the second are specific to WordPress and make unit testing of WordPress extensions a no-brainer.
Requirements
- PHP 7.2+
- Composer to install
Via Composer following packages are required:
- mockery/mockery version 1 (BSD-3-Clause)
- antecedent/patchwork version 2 (MIT)
When installed for development, following packages are also required:
- phpunit/phpunit version 8.5 or higher (BSD-3-Clause)
License
Brain Monkey is open source and released under MIT license. See LICENSE file for more info.
Question? Issues?
Brain Monkey is hosted on GitHub. Feel free to open issues there for suggestions, questions and real issues.
Who's Behind
I'm Giuseppe, I deal with PHP since 2005. For questions, rants or chat ping me on Twitter (@gmazzap) or on "The Loop" (Stack Exchange) chat.
Well, it's possible I'll ignore rants.
