[Nitro] testable controllers

Dan North dan at tastapod.com
Tue Sep 18 10:39:52 EDT 2007

Hi George.

This is a plea from the heart to revert the controller (dispatcher 
method) behaviour to returning a string rather than using multiple print 

I can test the former simply just by constructing a controller class and 
looking at the result of a method call. The latter requires me to 
subvert the global $stdout, which is just evil in a testing context.

As a developer, if I want to assemble the string in chunks I can do that 
during the method and then return the result at the end, which provides 
the same facility as multiple prints would.


More information about the Nitro-general mailing list