10up / wp_mock
A mocking library to take the pain out of unit testing for WordPress
Installs: 2 270 200
Dependents: 270
Suggesters: 0
Security: 0
Stars: 676
Watchers: 42
Forks: 70
Open Issues: 11
Requires
- php: >=7.4 < 9
- antecedent/patchwork: ^2.1
- mockery/mockery: ^1.6
- phpunit/phpunit: ^9.6
Requires (Dev)
- behat/behat: ^v3.11.0
- dealerdirect/phpcodesniffer-composer-installer: ^0.7
- friendsofphp/php-cs-fixer: ^3.4
- php-coveralls/php-coveralls: ^v2.7
- php-stubs/wordpress-globals: ^0.2
- php-stubs/wordpress-stubs: ^6.3
- phpcompatibility/php-compatibility: ^9.3
- phpstan/phpstan: ^1.10
- phpstan/phpstan-mockery: ^1.1
- phpstan/phpstan-phpunit: ^1.3
- sebastian/comparator: ^4.0.8
- sempro/phpunit-pretty-print: ^1.4
README
WP_Mock is an API mocking framework, built and maintained by 10up and GoDaddy for the purpose of making it possible to properly unit test within a WordPress project.
Installation
Install WP_Mock as a dev-dependency using Composer:
composer require --dev 10up/wp_mock
Documentation
Learn more about how to configure and how to use WP_Mock by reading the WP_Mock documentation.
Changelog
A complete listing of all notable changes is documented in the Changelog.
Support Level
Active: 10up and GoDaddy are actively working on this, and we expect to continue work for the foreseeable future, including testing with the most recent version of WordPress and PHP. Bug reports, feature requests, questions, and pull requests are welcome.
Contributing
Please read our Code of Conduct for details on our code of conduct and our Contributing Guidelines for details on the process for submitting pull requests.
Supporters
WP_Mock is supported by 10up and GoDaddy. GitBook kindly offers free hosting for WP_Mock documentation.
A special thanks to all WP_Mock contributors.