A.J. Brown-3 wrote: > > You should only need to unit test your forms if they are adding > functionality to Zend_Form. The built in Decorators, Filters, > Validators, etc should already be tested. If you're using a custom > Decorator, Filter, Validator, or View, you should test those > separately from the form. > > With that said, your integration tests only need to test that > $form->getValues() returns the expected filtered values and blocks > values you expect to reject. You would essentially setup a list of > inputs that are valid, loop over them and pass them to the form, and > make sure it validates. Then pass it a set of bad values, loop over > them, and assert that they do not validate. You're actually testing > the configuration of the form here, not the form classes themselves. > > I can mock up a quick test if that doesn't make sense. >
Hi A.J.! On the contrary - that makes a lot of sense. I was first thining of an approach to test forms through the corresponding controllers, but i like yours one better. I think its more logical to do it this way - thanks a lot for the hint! Good luck, Dmitry. -- View this message in context: http://n4.nabble.com/Unit-testing-Zend-Forms-tp999542p1754130.html Sent from the Zend Framework mailing list archive at Nabble.com.
