How to unit test MVC classes?

Viewed 4860

I'm new to unit testing in general, but wanted to implement it in MVC pattern (using PHP). Now I'm not sure how to approach this.

Should unit testing be built into the framework, or we just create a new folder called tests and include all necessary classes and unit test each one ?

In short, if there is a model M, it also has some coupling with the framework itself. So to test the model, should I include some portions of the framework in the unit tests ?

Are there some good code examples on how to go about accomplishing this.

3 Answers
Related