Unit Test in WordPress
Take a look at the WordPress core setup with PHPUnit: https://make.wordpress.org/core/handbook/testing/automated-testing/phpunit/ Using this process rather than rolling your own allows you to leverage the boostrapping (and other customization) specific for WordPress. From the Codex: When phpunit is invoked, the test suite runs a script that sets up a default installation of WordPress, with a configuration … Read more