-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[2.0.x] Readded Http\Request::hasPut() (#10283) #10289
Conversation
👍 |
@SidRoberts Can you please provide small test like https://github.com/phalcon/cphalcon/blob/master/tests/unit/Phalcon/Http/Request/HttpRequestTest.php#L401 ? |
@sergeyklay I've tried to write tests but as PUT data is taken from |
Another plus of testing |
The contents of file_get_contents("php://input") must be cached in a property, because if you call it twice the second will return null |
Why not use |
Could you please update the CHANGELOG? |
@andresgutierrez Done. |
[2.0.x] Readded Http\Request::hasPut() (#10283)
Thanks |
stream_wrapper_unregister("php");
stream_wrapper_register("php", "your_awesome_stream_mock_class");
// ...
// tests
// ...
stream_wrapper_restore("php"); |
See #10283 and https://github.com/phalcon/cphalcon/blob/1.3.4/ext/http/request.c#L692