If you are using a static call in your code, you are stuck with depending on what that static call is actually doing. It isn't possible to mock it.
Depending on what you are doing, you may not even want to mock it. If you are testing your controller, for example, you don't need to mock it. Post via whatever method the appropriate method (GET, POST, etc) and let the request object be created. Replace only whatever services are external to your system (Database, etc) and make sure that your response is correct. This test isn't strictly a "unit" test but shows that all your classes are working properly together.
If you are creating, this object in a model somewhere change the design so that the Request
object is passed in. Then you can create a mockRequest
with the proper behavior and without having to try to mock a static method call.