wp-api-libraries / wp-cloudflare-api

A WordPress php library for interacting with the CloudFlare API.
https://wp-api-libraries.github.io/wp-cloudflare-api/
8 stars 1 forks source link

Support multiple versions of PHPUnit and PHP #4

Closed cjhaas closed 7 years ago

cjhaas commented 7 years ago

I don't know if this is any help but this is my common config.

Instead of relying on a locally installed copy of PHPUnit and PHPCS this uses's composer to install those to vendor/bin and run from there. This also means that you can more easily test multiple PHP versions because composer will install the correct copy of PHPUnit automatically.

WordPress also recently added a shim for PHPUnit 6 support which I added to bootstrap.php: https://core.trac.wordpress.org/browser/trunk/tests/phpunit/includes/phpunit6-compat.php?order=date&desc=1

Lastly, just to make sure that both my local copy as well as Travis's are doing the same thing I have the run-unit.sh which runs everything.

Here's the Travis build log: https://travis-ci.org/vendi-advertising/wp-cloudflare-api