There's a few different ways to do this. We could load WP-CLI as a dependency, and just PHPUnit test like we normally would, or we could do tests in behat and do more integration tests with feature testing, like how you would test a CLI package.
I'm undecided currently, somewhat leaning towards using normal PHPUnit tests, but intrigued by how it could be done in behat as features. That's how woocommerce does it -> https://github.com/woocommerce/woocommerce/tree/master/tests/cli but not sure how it works with a CI tool.
There's a few different ways to do this. We could load WP-CLI as a dependency, and just PHPUnit test like we normally would, or we could do tests in behat and do more integration tests with feature testing, like how you would test a CLI package.
I'm undecided currently, somewhat leaning towards using normal PHPUnit tests, but intrigued by how it could be done in behat as features. That's how woocommerce does it -> https://github.com/woocommerce/woocommerce/tree/master/tests/cli but not sure how it works with a CI tool.