How To Unit Test Controllers


I know that there are already quite a lot of topics concerning this issue. I searched for possibilities and the only solution I find is that I should use functional tests to test my controllers.

But doesn’t that imply a huge performance drawback, since functional testing takes much longer than unit testing. At the moment I have a testsuite which contains around 40 functional tests and the whole testrun takes more than 5 minutes. So everybody can image how long maybe 1000 tests will take, and that is no productive working for me.

Am I doing something wrong or is it really the Yii way to test controllers with functional tests?

In Symfony for example it is possible to like "mock" the client, so that unit testing for controllers is possible.

Hope to hear your opinions to this issue!

Thx in advance :)