Unit testing PHP code in WordPress is not a straightforward task. Automated tests in WordPress use PHPUnit as a base. But there is lots of additional code added on top to adapt the framework to work with WordPress.
In this article we’ll look at the most common unit test issues in WordPress. For each issue, we’ll try and provide a fix, or a workaround.Read More