We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
So I've been using automatic fixture generation to test integration with an API that returns a lot of data.
However, I find myself duplicating some fixtures to edit some information in them so my assertions can pass depending on what I send in the request.
Instead of doing that, it would be great to have the following API:
MockClient::global([ UpdateDealRequest::class => MockResponse::fixture('pipedrive/deal/update-16685-response', merge: [ 'status' => 'won' ]), ]);
The merge parameter would merge the array into the mocked response, so the following assertion would pass:
merge
expect($response->dto())->status->toBe(Status::WON);
I am totally open to PRing that, I created the issue to avoid working on it if it was not going to be accepted 👍
The text was updated successfully, but these errors were encountered:
Ended up PRing anyway since the changes were relatively simple.
Sorry, something went wrong.
I'm going to close this as it's now a PR woo!
Successfully merging a pull request may close this issue.
So I've been using automatic fixture generation to test integration with an API that returns a lot of data.
However, I find myself duplicating some fixtures to edit some information in them so my assertions can pass depending on what I send in the request.
Instead of doing that, it would be great to have the following API:
The
merge
parameter would merge the array into the mocked response, so the following assertion would pass:I am totally open to PRing that, I created the issue to avoid working on it if it was not going to be accepted 👍
The text was updated successfully, but these errors were encountered: