I was writing a more high level and user friendly interface to speed up the development of modules, when I realized that in the manual you are calling the render() method within the action controller. While this might seem a reasonable thing to do, I was thinking, how are other developers going to test the action controllers? Or how am I going to format and validate the output before a view is rendered and echoed to the browser?
So, my question is, should the action controller be responsible for rendering and echoing the Views, or is this something that needs to be delegated to a different component? For example, I've changed: $view = new Zend_View; $view->render( str filename ); $view = $this->getView( str filename [, module ] ); return $view; This allows me to test the each action method against a View object, and also, format the output and validate the code using 3rd party libraries, such as HTML_Purifier and PHP_CodeSniffer. So, has anyone experienced this before? How are you testing your action controllers? Thanks, Federico
