Any suggestions for Controller Action UnitTesting

Does anyone know of a solution for unit testing what your controller action does (eg redirects to a page, renders a certain view, …)? ZF has this sort of functionality with Zend_Test_PHPUnit_ControllerTestCase, and it would be great if yii had something similar.

i would do some functional tests for that

as in the example:

$this->open(’?r=site/contact’);

// will redirect to our currently disabled page

$this->assertTextPresent(‘Contact Us Currently disabled’);

so just check the string which is present at the redirected page…

but i have to admit, that i haven’t done any testing yet - was just reading a bit inside the yii-book

I agree it could be done with functional testing, but it seems reasonable to want to test the action methods as part of your controller’s unit tests. Utilizing selenium for this sort of thing is not always ideal either.