I am writing unit tests that require that I either use or mock getRequest->getHeader('referer') within Zend framework where there is a condition on the referer to determine whether or not a new session is set based on its value.
What would be the best way to test this properly?
Should I simply mock the controller and call the header request like $controller->getRequest->getHeader('referer') or do I need to mock the request object?
Obviously since this is a unit test, were just mocking this behavior to ensure the code works correctly, so I'm not even sure how you would simulate a url request header.