Unfortunately, that does not seem to work when running a test.
I’m fairly new to test driven development. I was going to create a simple test for each action. Just to check for a piece of text on each page. Then use functional tests for more in depth testing. I was going to do this because unit tests run quicker, and I didn’t think it would take very long to write them. However this problem combined with another (I can’t work out how to access the rendered page from the test) has led me to abandon this. I’ll just write functional test as you suggest.
I suppose you created a controller instance and then called the action. That’s why it doesn’t really work: The framework does much more before it calls a controller action: Init the application, use an URL manager to inspect $_GET to find the controller and action, etc. etc.
You’d have to emulate all request parameters, create an application and call run() to really create the same conditions. Much more cumbersome than using functional tests right away.