https://github.com/humanmade/plugin-tester
Simple Docker image for running unit tests for WordPress plugins
https://github.com/humanmade/plugin-tester
Last synced: about 1 year ago
JSON representation
Simple Docker image for running unit tests for WordPress plugins
- Host: GitHub
- URL: https://github.com/humanmade/plugin-tester
- Owner: humanmade
- Created: 2020-05-04T10:46:20.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2025-06-03T18:55:03.000Z (about 1 year ago)
- Last Synced: 2025-06-30T16:14:53.600Z (about 1 year ago)
- Language: Dockerfile
- Homepage:
- Size: 32.2 KB
- Stars: 21
- Watchers: 22
- Forks: 3
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# humanmade/plugin-tester
[](https://hub.docker.com/repository/docker/humanmade/plugin-tester) [](https://hub.docker.com/repository/docker/humanmade/plugin-tester)
Simple Docker image for running unit tests for WordPress plugins.
To run the tests for your plugin, run this in your plugin directory:
```sh
docker run --rm -v "$PWD:/code" humanmade/plugin-tester
```
You will need `phpunit/phpunit` specified as a Composer dependency of your plugin. Additional arguments can be passed to PHPUnit on the CLI directly, e.g.:
```sh
docker run --rm -v "$PWD:/code" humanmade/plugin-tester --stop-on-error
```
## Configuration
To configure PHPUnit, place a `phpunit.xml.dist` in the plugin root. You can alternatively use the command line arguments for PHPUnit for simpler tests.
Typically your `tests` directory in your plugin should include a `bootstrap.php` including at least the following:
```php