About four years ago, I shared a post about WP-CLI. It wasn’t exactly a new project at the time, but it was far less developed than it is now.

The WP-CLI Homepage
As I mentioned in yesterday’s post, one of the things that we’re doing with is making sure that all of our work is unit tested from the initial version.
And when it comes to unit testing in PHP, many of us are familiar with PHPUnit; however, when it comes to unit testing plugins that are integrated with WordPress, it helps to have a test environment set up.
Sure, it’s possible to set aside a test database, test content, and then defined mock objects based on interfaces (and I’m not here to dissuade anyone from doing that). But WP-CLI offers a much easier way to go about doing just that in a more automated manner.
But first, it’s important to make sure that it’s correctly installed on your system.
Continue reading