Closed ishan-biztech closed 3 years ago
Are you looking for how to test the outbound API calls your application is making, or are you wanting to test requests being made to your application?
Outbound API calls like making calls to Stripe or Xero API, etc. Currently it's not documented like how to do this(or what is the recommended way I should say).
For example if you look at Laravel docs, they have dedicated section on how to mock HTTP requests made by Laravel's Illuminate\Support\Facades\Http
client.
This issue is stale because it has been open for 120 days with no activity. Remove the stale
label or comment or this will be closed in 15 days
Hi @markstory, are you able to assign any milestone or something to this feature? To prevent from being closed?
Is someone intending to work on this yet? Looking to take this up soon.
@theafolayan I don't think there has been any movement on this. I have been preoccupied with fixtures and haven't gotten to this yet. If you have time an issue with the proposed API you are considering would be a great place to start.
What is the status here? Maybe we could add some basic examples in the doc of how to mock using mock builder. The changes would be in the page https://book.cakephp.org/4/en/development/testing.html
This can be closed now. The new features will be part of 4.3 and the docs are in the 4.next branch of this repo.
Issue Description
Currently we are missing documentation on how to test HTTP/Curl API calls in CakePHP. It's not clear like what is an best practice to test these http request.
In above both cases we should add some content(along with some pseudo code) to let developers know what is the recommended way of doing this.
Do you want to address this issue?
I might but I don't actually know what is the best practice to test HTTP calls in CakePHP yet! Also I can't find much of a content on this topic.