I would like to start using TDD in my PHP projects using Symfony 1.4 framework. Writing unit tests for my classes in /lib directories is fairly stright forward. But my question is, what steps do you proceed developing your applications?
I mean specifically:
- Do you write tests for model classes as well? If yes, how?
- Do you write unit tests for controllers somehow, or do you use only functional tests?
- Using functional tests, how deeply do you go? Just checking 200 status code, or going through DOM? If so, how deeply?
I think, I’ve got a general idea of TDD and I really like the approach, but I’m struggling with an execution on MVC PHP project especially using Symfony 1.4.
1 Answer