
Adding Unit tests to a WordPress plugin via VVV and PHPUnit
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 setup our plugin’s unit tests ) becomes extremely muddy very fast. This has been haunting […]
Categories: WordPress • Tags: PHP, PHPUnit, Unit Testing, VVV, WordPress, WordPress plugin