Advanced OOP For WordPress Part 2: Setting Up Automated Testing Of WordPress REST API Plugins

By Josh Pollock

In my last post, I showed how to modify the WordPress content endpoints using WordPress hooks — aka the WordPress plugins API — during REST API requests. The practical example changed the underlying query to improve search.

Now I need to test that code isolated from the WordPress plugins API. For this article, we will assume the Plugins API is working as documented. This, however, isn’t a safe assumption, so we need to be ready if it isn’t working as planned.

This post is really about how we can control for that problem. I’ll be walking you through setting up a …read more

Source:: Torque

No comments