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
Extract GuzzleHttp\Tests\Server into standalone composer package. #2295
Comments
Let’s consider this for 7.0 |
@martinssipenko the code is open source, so as long as you retain the original license, you are free to copy the code. Personally, I think the mock server is a great way to test Guzzle itself, but depending code should rather be covered by integration tests, not unit tests. Also, ideally your HTTP dependencies are abstracted away with some sort of intermediate interface, so your business logic does not actually depend on anything HTTP. |
I guess this is related with #2228 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 2 weeks if no further activity occurs. Thank you for your contributions. |
It issue was incorrectly marked as stale. Sorry for that. I see that your issue is because you installed the package with composer. Try cloning the repository instead. |
I've just published https://github.com/guzzle/test-server I think we should mark this class as deprecated and then remove it in next minor release. |
I'm closing this issue. |
IF anyone is looking for a solution without having to use the test server: While trying to test a middleware, I used a different way to test it without the test server.
|
Description
Guzzle has a great mock server tooling that is used for testing http requests. I would like to propose to extract the tooling into standalone composer package so that other projects that need similar tooling could benefit from it.
The "mock-server" then could be installed as
dev-dependancy
and used in tests that need to make http requests.Currently the only option is to copy/paste the
GuzzleHttp\Tests\Server
class andserver.js
files into project, which is not ideal.I'd be more than happy to contribute, but given this would require a new project setup (repository, composer, ci), I'd like to discuss how this could be achieved. If it's decided to do this, should this be done as part of guzzle organisation? Or if not, is it ok to copy code into different project?
Looking forward to your thoughts.
The text was updated successfully, but these errors were encountered: