Many developers have heard the term unit testing, but some might have nightmares about how complex it might be. That’s why I enjoyed Thorsten Frommen’s straightforward introduction to unit testing for WordPress. There are five questions that every unit test should answer:
- What are you testing?
- What should it do?
- What is the actual result (i.e., output, or return value)?
- What is the expected result?
- How can the test be reproduced?
Thorsten covers the common basic understanding and notes he’ll be writing additional posts to go deeper.