From the blog
Posted 2014-08-21
Testing Code That Emits Output
Here's the scenario: you have code that will emit headers and content, for instance, a front controller. How do you test this?
The answer is remarkably simple, but non-obvious: namespaces.