Best WordPress Hosting
 

Unit Testing Ajax and API Requests in WordPress Plugins

via deliciousbrains.com => original post link

I am scared of unit testing. There, I’ve said it. Unit testing is one of those practices that I know I should be doing, there are benefits to doing it, but it just seems too hard to implement, especially with an established codebase.

Recently I have been building our next plugin and throughout its development I have had a nagging voice in my head constantly reminding me about unit tests. So I’ve taken the plunge and started writing tests. In this post I will introduce you to unit testing a WordPress plugin, using my recent experience as a guide.

What is Unit Testing