I found time for a follow-up much sooner than expected.  Here’s another example that gets into a bit more depth:

 

http://blog.library.villanova.edu/libtech/2013/01/29/a-more-complex-vufind-2-unit-test/

 

- Demian

 

From: Demian Katz
Sent: Tuesday, January 29, 2013 2:23 PM
To: vufind-tech@lists.sourceforge.net
Subject: Unit test blog post

 

I’ve finally gotten around to writing a blog post about VuFind 2 unit testing:

 

http://blog.library.villanova.edu/libtech/2013/01/29/a-simple-vufind-2-unit-test/

 

As I explain in the post, testing is often difficult at this stage of development (there’s still some more work to be done on better decoupling VuFind’s classes so that they can be tested independently), but hopefully this very simple example helps show some of the fundamentals.

 

I may try to do a follow-up demonstrating a more complex example in the future.

 

Let me know what you think (and whether you’re interested in trying your hand at test writing)!

 

thanks,

Demian