PHPackages                             jdgrimes/wpppb - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Testing &amp; Quality](/categories/testing)
4. /
5. jdgrimes/wpppb

ActiveLibrary[Testing &amp; Quality](/categories/testing)

jdgrimes/wpppb
==============

Bootstrap for integration testing WordPress plugins with PHPUnit

0.3.6(7y ago)148.4k3[6 issues](https://github.com/JDGrimes/wpppb/issues)[1 PRs](https://github.com/JDGrimes/wpppb/pulls)MITPHPPHP &gt;=5.2.0

Since Sep 9Pushed 7y ago2 watchersCompare

[ Source](https://github.com/JDGrimes/wpppb)[ Packagist](https://packagist.org/packages/jdgrimes/wpppb)[ Docs](https://github.com/JDGrimes/wpppb)[ RSS](/packages/jdgrimes-wpppb/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)DependenciesVersions (14)Used By (0)

WP Plugin PHPUnit Bootstrap [![Build Status](https://camo.githubusercontent.com/3b69d6747244c67f99992825c7e55e02ea7edbe879eecb96714f8159039a66c3/68747470733a2f2f7472617669732d63692e6f72672f4a444772696d65732f77707070622e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/JDGrimes/wpppb) [![Latest Stable Version](https://camo.githubusercontent.com/df2b9918635a302956e878fce162795d1e1199c1ffc42ac7c1f7a2a91ff29dc5/68747470733a2f2f706f7365722e707567782e6f72672f6a646772696d65732f77707070622f76657273696f6e)](https://packagist.org/packages/jdgrimes/wpppb) [![License](https://camo.githubusercontent.com/0ce1c0c4cac8964edaf3ecbface93275fa4f9949bf1cb82e73fd984621f87d1d/68747470733a2f2f706f7365722e707567782e6f72672f6a646772696d65732f77707070622f6c6963656e7365)](https://packagist.org/packages/jdgrimes/wpppb)
===========================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================================

[](#wp-plugin-phpunit-bootstrap---)

Bootstrap for integration testing WordPress plugins with PHPUnit.

Installation
------------

[](#installation)

```
composer require --dev jdgrimes/wpppb
```

Set Up
------

[](#set-up)

First, you will need a local checkout of the WordPress development repo, including the `tests` directory. The recommended way to get this, particularly if you intend to contribute to WordPress core, is with [VVV](https://make.wordpress.org/core/handbook/tutorials/installing-a-local-server/installing-vvv/). WPPPB builds on the testing tools already included with WordPress core, so it won't work without them.

Once you have a local copy of WordPress's `tests` directory, you can run the set-up script for WPPPB:

```
vendor/bin/wpppb-init
```

Answer the prompts, and you are ready to go!

Your tests will be placed in the `tests` directory that will be created in the root of your project (i.e., alongside the `vendor` directory added by Composer). Your plugin's source (the part that would be zipped up and installed on a WordPress site) is expected to be in a `src` directory alonside these two, and not in the root of your project itself. Example file structure would look like this:

```
- src/
  - my-plugin.php
  - includes/
  - etc.
- tests/
- vendor/

```

With a few modifications, you could probably use WPPPB with a different directory structure, but this is what it expects by default.

Usage
-----

[](#usage)

You can run your PHPUnit tests just as you normally would:

```
phpunit
```

You can also do other cool things like [test your plugin's uninstall routine](https://github.com/JDGrimes/wpppb/wiki/Testing-Uninstallation).

(Note that the default bootstrap utilizes Composer's PHP autoloader, which requires PHP 5.3. See here for [instructions on usage with PHP 5.2](https://github.com/JDGrimes/wpppb/wiki/PHP-5.2).)

Purpose
-------

[](#purpose)

The purpose of this project is to provide a bootstrap for plugin developers who want to perform integration tests for their plugin using WordPress core's testsuite. Its aim is not only to make this easier, but also better, by providing an implementation that makes the tests as realistic as possible.

To this end, the loader works by remotely activating the plugin(s), and letting WordPress load them just as it normally would. This provides more realistic testing than manually including and activating the plugins on the `muplugins_loaded` action, as is usually done.

License
-------

[](#license)

This project's code is provided under the MIT license.

###  Health Score

29

—

LowBetter than 59% of packages

Maintenance11

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~79 days

Recently: every ~131 days

Total

13

Last Release

2583d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/4005415?v=4)[J.D. Grimes](/maintainers/jdgrimes)[@JDGrimes](https://github.com/JDGrimes)

---

Top Contributors

[![JDGrimes](https://avatars.githubusercontent.com/u/4005415?v=4)](https://github.com/JDGrimes "JDGrimes (42 commits)")

---

Tags

phpunittestingwordpresswordpress-development

### Embed Badge

![Health badge](/badges/jdgrimes-wpppb/health.svg)

```
[![Health](https://phpackages.com/badges/jdgrimes-wpppb/health.svg)](https://phpackages.com/packages/jdgrimes-wpppb)
```

###  Alternatives

[phpspec/prophecy

Highly opinionated mocking framework for PHP 5.3+

8.5k551.7M682](/packages/phpspec-prophecy)[brianium/paratest

Parallel testing for PHP

2.5k118.8M754](/packages/brianium-paratest)[beberlei/assert

Thin assertion library for input validation in business models.

2.4k96.9M570](/packages/beberlei-assert)[mikey179/vfsstream

Virtual file system to mock the real file system in unit tests.

1.4k108.0M2.7k](/packages/mikey179-vfsstream)[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[phpspec/phpspec

Specification-oriented BDD framework for PHP 7.1+

1.9k36.7M3.1k](/packages/phpspec-phpspec)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
