title: PHPUnit, superglobal vars. How to setup test such that $_SERVER and $_GET are properly set?
body: <p>I am writing some PHP code to parse incoming URLs. It relies heavily on PHP globals such as <code>$_SERVER</code> and <code>$_GET</code>. I am thinking of manually setting these up in PHPUnit unit test <code>setUp()</code> function. Is there a better way of doing this?</p>