Skip to content

Allow swapping Guzzle/ClientInterface #65

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

Closed
wants to merge 1 commit into from

Conversation

jtolj
Copy link

@jtolj jtolj commented Jul 6, 2023

Summary

This PR adds a set_http_client() method to ConvertKit_API that accepts a GuzzleHttp\ClientInterface. This would allow for more easily testing the package when integrating with other frameworks without hitting the network or needing to set up API credentials and dummy data.

Testing

testClientInterfaceInjection()

Injects a GuzzleHttp\Handler\MockHandler and asserts the results are as expected.

Checklist

@jtolj jtolj changed the title Allow injection of Guzzle/ClientInterface Allow swapping Guzzle/ClientInterface Jul 6, 2023
@n7studios n7studios mentioned this pull request Jul 17, 2023
5 tasks
@n7studios
Copy link
Contributor

Implemented here as tests were failing for some reason. Thanks.

@n7studios n7studios closed this Jul 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants