O'Reilly logo

WordPress 3 Plugin Development Essentials by Everett Griffiths, Brian Bondari

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unit tests

We would be remiss if we did not mention unit tests in this chapter. Unit testing is a method by which individual units of source code are tested to determine if they are fit for use. Remember from the beginning of the book how we recommended that you write your code in "units"? This is where it all comes together: units of code should be a size that makes them easy to test.

There are a couple of testing frameworks available for PHP that help you write unit tests. It's beyond the scope of this book to demonstrate their use, but we encourage you to look into them if your plugin is getting complicated and difficult to maintain. Unit tests are a real lifesaver because they help you catch any place where your code has failed. All of the ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required