2017 © Pedro Peláez
 

library phpunit-wp-cli-runner

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

image

polevaultweb/phpunit-wp-cli-runner

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

  • Tuesday, November 1, 2016
  • by polevaultweb
  • Repository
  • 1 Watchers
  • 3 Stars
  • 3,176 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

phpunit-wp-cli-runner

Helper to test custom WP-CLI commands by bootstrapping WP-CLI in PHPUnit, (*1)

Installation

To install simply require the package in the composer.json file like, (*2)

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

Then use composer update to fetch the package., (*3)

Bootstrap

In your PHPUnit bootstrap.php file you will need add the following:, (*4)

$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., (*5)

See the blog post for more information., (*6)

The Versions

01/11 2016

dev-master

9999999-dev https://github.com/polevaultweb/phpunit-wp-cli-runner

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

  Sources   Download

GPL

The Requires

 

phpunit testing wp-cli