I'm writing Yet Another PHP Framework, and now that I've coded a good deal of stuff, I'm starting to think about unit tests (yes, I know, bad form).
Some actions make the framework to modify HTTP behavior, such as create cookies, redirect the browser. Another major feature is that the the visited URI can affect the way the framework should behave.
In a nutshell, I need to be able to test stuff that affect, or are affected by, the environment, and not only the return values of functions/methods. How can I do this the easiest?