From: Katana <ka...@ka...> - 2004-06-05 08:40:07
|
Hi both of you, > About test units/scripts: we don't have any (at least not that I know..) > Betrand? > I'm not familar with automated testing. Would you use PEAR's php unit(2)? > What kind of tests would you create for formsess? (maybe you can just > include your tests for the validate tag you talked about) Several times, I have been thinking about writing Unit Tests for formsess. But I have to admit that due to my very little experience in that domain, and to the "complexity" of formsess environnement, I don't really know how to do that. Formsess really has a specific architecture when compared to most libs (lots of different types of components: prefilter, validators, (php & js), tag functions, formsess class itself...). By example, testing if formsesss still parses a tag correctly requires 2 steps (prefilter => smarty function using tag class, and smarty function => html). And of course both operations imply lots of logic and can't be reduced to a single method / function. But of course I think that unit tests would be a good asset for the quality of the releases. Pierre, if you have any hint about how unit tests could be implemented for formsess, I would be glad to spend some time on it :) Bertrand |