mailgun/mailgun-php

How to mock Mailgun?

Closed this issue · 1 comments

Not really an issue, but there's no "Discussions", so ...

Has anyone figured out how to mock the Mailgun service in their own Feature / Unit testing?

I've been staring at the tests in this repo, trying to figure out how I can apply the same approach to my own Pest testing of a Laravel app, but I'm kinda lost.

Hello
you can use something like https://github.com/rowanhill/wiremock-php
It's a good approach to mock request itself and test all lib functionality, if needed