onOfficeGmbH / sdk

Official client for the onOffice API
https://apidoc.onoffice.de/
MIT License
9 stars 11 forks source link

Add integration test #49

Closed jayay closed 2 years ago

jayay commented 2 years ago

This integration test spawns a little HTTP server with SSL and another subprocess with PHP, controlled by faketime, which fakes the current time for the PHP process it has control over.

In that way, we have the possibility to create reproducible requests, and to monitor behavioral changes in the requests sent to our API. The sent request can be observed and tested for certain traits in the unit test, or be compared as a whole in the way it is right now.

known bugs ~If the PHP subprocess takes longer than one second to send the request, the timestamp might be off, also leading to a different HMAC.~ Fixed in 1a58577

jayay commented 2 years ago

@legionth I added a new test suite and renamed the old one. I did not feel the necessity to create new directories for those, I hope that's okay for now.