mercredi 28 février 2018

Testing whether a webhook route is called in Laravel

I've developed a package that creates a route to listen for SNS webhooks, and I would like to add some tests to ensure that it works properly.

I am stuck on being able to detect if a specific route (the webhook receiver) is called while running the testsuite.

The Laravel documentation describes how to test your own routes through $this->get('/'), but the webhook situation is different as it is being requested by an external service.

Another question has been asked that is similar but differs in that the question asks about calling the route through Guzzle.

Aucun commentaire:

Enregistrer un commentaire