Written by David Stockton
|
Friday, January 15 2010 15:39
|
As promised, I've finished the editing of the screen cast and uploaded it to the intarwebs. You can view it here:
PHPUnit and Test Driven Development
. I step you through creating a functional Zend_Form without having to set up the whole Zend MVC framework.
The form is presented as a standard HTML form that submits to a PHP page for processing. That page simply determines if the form is "valid" or not by calling Zend_Form's isValid() method. The form has three fields: name, email and phone. Using Test Driven Development, I show you how to write unit tests first and then write a little bit of code to make them pass until at the end we've got a fully functional Zend_Form object with validators (Zend_Validate) and filters (Zend_Filter), including development of a custom filter class for formatting the phone number and another filter for allowing alphabetic phone number entry.
Please take a look and send any comments or questions to
This e-mail address is being protected from spambots, you need JavaScript enabled to view it
.
I hope you enjoy the screencast, and I hope to see you at our next meeting.
Thanks,
David
|