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
@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.
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