PHP Unit Testing: How to Write Your First Test for WordPress
PHP unit testing helps you find bugs in small sections of code. Learn how to write a unit test here.
PHP unit testing helps you find bugs in small sections of code. Learn how to write a unit test here.
So far we’ve done little more than introduce you to the idea of building tests for your WordPress plugins and talk about a bunch of the extra terms you need to understand to dive deeper into testing your code. Today we’re going to make it practical by grabbing one of my free plugins and adding a few unit tests to show you how to put it together.
Today, we’re going to take another step towards writing well-tested code, by introducing you to all the jargon that gets thrown around when you talk about unit testing for WordPress.
While you can find lots of content about unit testing PHP applications, there aren’t many people talking about unit testing specifically for WordPress. There is precious little written about where to start for developers that are ready to increase their code quality and want to learn how to add tests to their work.
Your inbox needs more Nexcess
Grow your online business faster with news, tips, strategies, and inspiration.