Overview for 'mwop'

Testing Code That Emits Output

Written by Matthew Weier o'Phinney / Original link on Aug. 21, 2014

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. Prerequisites For this approach to work, the assumptions are: Your code emitting headers and output lives in a…