PHPackages                             polevaultweb/phpunit-wp-cli-runner - 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. polevaultweb/phpunit-wp-cli-runner

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

polevaultweb/phpunit-wp-cli-runner
==================================

Helper to test custom WP-CLI commands by bootstrapping WP-CLI in PHPUnit

105.0k1PHP

Since Nov 1Pushed 9y ago2 watchersCompare

[ Source](https://github.com/polevaultweb/phpunit-wp-cli-runner)[ Packagist](https://packagist.org/packages/polevaultweb/phpunit-wp-cli-runner)[ RSS](/packages/polevaultweb-phpunit-wp-cli-runner/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

phpunit-wp-cli-runner
=====================

[](#phpunit-wp-cli-runner)

Helper to test custom WP-CLI commands by bootstrapping WP-CLI in PHPUnit

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

[](#installation)

To install simply require the package in the `composer.json` file like

```
"require-dev":
{
"polevaultweb/phpunit-wp-cli-runner": "master@dev"
}
```

Then use `composer update` to fetch the package.

### Bootstrap

[](#bootstrap)

In your PHPUnit `bootstrap.php` file you will need add the following:

```
$vendorDir = '/path/to/vendor';
\Polevaultweb\PHPUnit_WP_CLI_Runner\Runner::init( $vendorDir );
```

Then WP-CLI will be loaded whenever you instantiate your custom CLI command classes in your unit tests cases.

See the [blog post](http://polevaultweb.com/?p=818) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity28

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a5332cfc97e7f7a221cddd5feb87a861346acd7670b895b65f59e78b26490c9?d=identicon)[polevaultweb](/maintainers/polevaultweb)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/polevaultweb-phpunit-wp-cli-runner/health.svg)

```
[![Health](https://phpackages.com/badges/polevaultweb-phpunit-wp-cli-runner/health.svg)](https://phpackages.com/packages/polevaultweb-phpunit-wp-cli-runner)
```

###  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)
