A quick overview of mocking an HTTP request using Laravel and PHP Pest.

A quick overview of mocking an HTTP request using Laravel and PHP Pest.

Eugene van der Merwe

54 года назад

471 Просмотров

For years I've struggled testing APIs until I snapped that you can't use the native APIs as provided by the vendor. You have to use Laravel's native HTTP client before easy mocking and testing becomes a reality.

I've made a quick video to show how this is done, using the WHMCS PHP API where I've removed CURL in favour of the native Laravel HTTP client.
Ссылки и html тэги не поддерживаются


Комментарии: