Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/joshcanhelp/wp-unit-test-helpers
A set of traits to help you write unit tests for WP plugins and themes
https://github.com/joshcanhelp/wp-unit-test-helpers
Last synced: 24 days ago
JSON representation
A set of traits to help you write unit tests for WP plugins and themes
- Host: GitHub
- URL: https://github.com/joshcanhelp/wp-unit-test-helpers
- Owner: joshcanhelp
- License: mit
- Created: 2020-07-20T01:51:11.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-01-11T22:17:05.000Z (about 4 years ago)
- Last Synced: 2024-12-18T01:47:32.822Z (25 days ago)
- Language: PHP
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# WP Unit Test Helpers
[![Latest Stable Version](https://poser.pugx.org/joshcanhelp/wp-unit-test-helpers/v/stable)](https://packagist.org/packages/joshcanhelp/wp-unit-test-helpers)
[![License](https://poser.pugx.org/joshcanhelp/wp-unit-test-helpers/license)](https://packagist.org/packages/joshcanhelp/wp-unit-test-helpers)
[![Total Downloads](https://poser.pugx.org/joshcanhelp/wp-unit-test-helpers/downloads)](https://packagist.org/packages/joshcanhelp/wp-unit-test-helpers)See [the introduction post](https://www.joshcanhelp.com/wordpress-unit-testing-techniques/) for more details about how this is used.
Examples of these traits in use:
- [HTTP request inspection](https://github.com/joshcanhelp/wp-test-plugin/blob/master/tests/testHttpHaltWpTestCase.php)
- [HTTP response handling](https://github.com/joshcanhelp/wp-test-plugin/blob/master/tests/testHttpMockWpTestCase.php)
- [Redirect inspection](https://github.com/joshcanhelp/wp-test-plugin/blob/master/tests/testRedirectHaltWpTestCase.php)
- [Killed processes with wp_die()](https://github.com/joshcanhelp/wp-test-plugin/blob/master/tests/testWpDieHandlingWpTestCase.php)
- [AJAX Requests](https://github.com/joshcanhelp/wp-test-plugin/blob/master/tests/testAjaxHandlingWpTestCase.php)
- [Hooked Functions](https://github.com/joshcanhelp/wp-test-plugin/blob/master/tests/testHookedFunctionsWpTestCase.php)
- [Enqueued Styles and Scripts](https://github.com/joshcanhelp/wp-test-plugin/blob/master/tests/testEnqueuedStyleWpTestCase.php)