The cornerstone of this method leverages my wordpress-core-t || Not too long ago I wrote about how to setup a Composer-based WordPress site with the core PHPUnit testing library to run integration tests.
The cornerstone of this method leverages my wordpress-core-tests package, which is essentially a Composerified subdirectory mirror of the PHPUnit supporting files within the WordPress core develop repository.
After maintaining it for a few months now, it became clear that my solution needed to become more robust.
This is a bit of a tricky problem to solve, but to wrap our heads around it, we need to understand the problem, and the goals we’re aiming to solve.
Goal: I want all of my PHP dependencies installed via Composer, so I can simply composer install and it’s good to go. The WordPress core PHPUnit files are of course PHP, and should be installed via Composer as well.
Problem: The PHPUnit files used by WordPress core are generally installed using a shell script and subversion checkout.
Note: Installing the PHPUnit files like this makes the most sense for tests that you are writing for the core of your application and/or integration/acceptance tests where the