Custom tests

Hopefully the sample tests listed here got your imagination going. Some software projects rely heavily on tests, and in general, we fully condone this practice. If you can identify "fail" points in your code and then write functions which test for them, you will save both yours and your users' time and frustration.

If you have ever had problems deploying a development site to a live production server, then these types of tests can save you a lot of hassle. For example, if you told your client to provide a server with exact specifications, this can ensure that the server meets those requirements.

Basically, any time your project starts to have any requirements that deviate from what's normally available in a WordPress installation, you ...

Get WordPress 3 Plugin Development Essentials now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.