lundi 23 mars 2015

How to test async web services with PHPUnit?

I am writing a test for a library which is a wrapper on an existing web service. Some of the calls of this web service are async: they ask for a callback url which they call when the processing is finished.


What is the best way to test this with PHPUnit? Coming from other languages, my first idea is to spin up a web server as a part of the test and wait for the answer, but as far as I know this is not that easy in PHP.


Is there a better way to do this?


Aucun commentaire:

Enregistrer un commentaire