Use php-vcr to record http interactions#986
Merged
c9s merged 2 commits intoOct 28, 2018
Merged
Conversation
This installs php-vcr into the project. php-vcr is a port of a popular ruby gem that allows to record and reproduce http interactions, thus avoiding the need to actually hit web services during tests. More info at http://php-vcr.github.io
This uses php-vcr to record http interactions during the execution of KnowCommandTest, avoiding the need to actually hit the Pecl, GitHub and BitBucket's API.
22799b4 to
254b6f5
Compare
2 similar comments
Member
|
Looks good, thanks. |
Contributor
Author
|
Thanks, @c9s. I'll push another PR wrapping all http interactions in the tests with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
While submitting #985, I noticed my Travis build kept failing due to API limits while running tests for the
KnownCommandclass.This introduces
php-vcrto the project, which allows to record http interactions and reproduce them during tests, thus avoiding the need to actually hit the API. This will solve any API limit issue from now on. Cassettes only need to be updated if the real APIs change.This PR only makes use of
php-vcrinKnownCommandTestsince that's where I noticed most builds fail. If this PR gets accepted, we can start working towards usingphp-vcrfor all http interactions in the project's tests.More info on
php-vcrat http://php-vcr.github.io.