Conversation
|
@Art4 Do you think something like this is reasonable? I tried finding a library for the PHP server but after reviewing the following, I gave up and wrote my own helper class:
|
|
I would have said that it is not worth the effort to create such a test because the File class will be deprecated. But since you've already done the work, we can keep the test. Requiring a separate library for it would definitely be too much. |
3cf2b9f to
bdb50df
Compare
jtojnar
left a comment
There was a problem hiding this comment.
Thanks for the review, updated. I think this integration test will be useful for PSR-18 as well since how the permanent/temporary redirection interact with get_final_url is non-trivial. Though there we at least will not need to spawn a server since that will support mocking.
Since the custom HTTP client in File based on curl cannot really be mocked, let’s add an actual HTTP server to allow for integration and regression testing during the transition to PSR-18 implementations.
This is a regression test for simplepie#812.
|
I've found this library for mocking a webserver: https://packagist.org/packages/donatj/mock-webserver
I've looked into the code and it looks very good and straight forward. I've added it in #909. |
|
This was superseded by #909. |
|
The test cases are ported to the new infrastructure in #918. |
This is a regression test for #812.