tilcode.blog
Adding Unit tests to a WordPress plugin via VVV and PHPUnit - TIL Code
While the official documentation can be found at https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/ , this is very far from being approachable to folks who are just starting (like me). It honestly took half a dozen of tries during the last year to make it work as expected. While steps 1 ( Install PHPUnit ), and 2 ( Install WP-CLI ) are somewhat clear, step 3 ( Use WP-CLI to …